Webhook differences on Test and on Production mode

61 views
Skip to first unread message

Máté

unread,
Feb 10, 2017, 11:26:13 AM2/10/17
to Stripe API Discussion
Hi there, 

When I use the Subscription API on production (version  2015-10-16), after a successful subscription creation I receive on event for payment success invoice.payment_succeeded through the webhooks.

However, doing the same thing in Test mode, an extra charge.succeeded event is fired on top of the invoice.payment_succeeded event. 

Which one is the correct behavior?

Thanks and regards,
Máté
subscription-webhook.png

Jim Danz

unread,
Feb 10, 2017, 7:37:34 PM2/10/17
to api-d...@lists.stripe.com
Hi Máté,

By chance, are you testing with free subscriptions in Production mode?

If a subscription is free, no charge will be created. As such you'll
just get an invoice.payment_succeeded webhook.
Whenever a subscription is non-free and a charge needs to be created,
you can expect both an invoice.payment_succeeded webhook and a
charge.succeeded webhook.

Otherwise, Test and Production mode should have identical behavior.

Best,
Jim
> --
> You received this message because you are subscribed to the Google Groups
> "Stripe API Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to api-discuss...@lists.stripe.com.
> To post to this group, send email to api-d...@lists.stripe.com.
> Visit this group at
> https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Máté

unread,
Feb 12, 2017, 3:42:30 PM2/12/17
to Stripe API Discussion
Hi Jim,

The subscription was not free, just had a coupon attached that rendered it free (€0).

Thanks for the quick reply!

Regards
Máté
Reply all
Reply to author
Forward
0 new messages