stripe/stripe-cli

Event Order

zhoub opened this issue · 0 comments

Issue

Using stripe version 1.19.5.

For 2 events, customer.subscription.created and customer.subscription.updated,

2024-05-23 15:54:05   --> customer.subscription.created [evt_1PJVXNBzH5DDPixH6s1mtfkF]
2024-05-23 15:54:05   --> customer.subscription.updated [evt_1PJVXNBzH5DDPixHId5cNSFm]
2024-05-23 15:54:05  <--  [200] POST http://localhost:10000/v1/stripe/webhook/process [evt_1PJVXNBzH5DDPixHId5cNSFm]
2024-05-23 15:54:05  <--  [200] POST http://localhost:10000/v1/stripe/webhook/process [evt_1PJVXNBzH5DDPixH6s1mtfkF]

Strip Cli receives 2 events with correct order, created event then updated event. But it forwards the events with reversed order.

Expected Behavior

Should be

2024-05-23 15:54:05  <--  [200] POST http://localhost:10000/v1/stripe/webhook/process [evt_1PJVXNBzH5DDPixH6s1mtfkF]
2024-05-23 15:54:05  <--  [200] POST http://localhost:10000/v1/stripe/webhook/process [evt_1PJVXNBzH5DDPixHId5cNSFm]

The event order at Dashboard is correct.

Steps to reproduce

Use Stripe Dashboard to create a period product, then use Stripe CLI to listen to the events, create a checkout session from web UI.

Traceback

No

Environment

macOS + stripe version 1.19.5