#ZeroThreeEight

1 messages ยท Page 1 of 1 (latest)

marsh pebbleBOT
twilit ravine
#

Hi again ๐Ÿ‘‹ can you elaborate a bit more? Did you run into problems while following the steps in the document provided previously, or did it not accomplish what you are looking for?

dire plume
#

Hi yes, so I looked into the docs you sent, it was about starting checkouts with promo's and thats clear to me

#

But adding a discount to an existing subscription, for only the next coming cycle

twilit ravine
dire plume
#

I think I know enough then

#

Thanks!

#

One more question

#

Is there a way to check if someones payment is the first payment

#

and which webhook would that be

twilit ravine
#

First payment of a Subscription? You can check the billing_reason on the Invoice that gets created. It will hvae a value of subscription_create if it's the first Invoice of a Subscription:
https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason

invoice.payment_succeeded would be a good Event to catch a successful payment on an Invoice.

dire plume
#

invoice.payment_succeeded โœ…

#

but, billing reason will have subscription_create only the first time?

twilit ravine
#

Yup, afterwards it will have other reasons, such as subscription_cycle.

You can use test clocks to move Subscriptions through their full lifecycles quickly so you see exactly what Events are generated and when:
https://stripe.com/docs/billing/testing/test-clocks

dire plume
#

Cool, thanks

twilit ravine
#

Any time!

marsh pebbleBOT