#Liam

1 messages · Page 1 of 1 (latest)

rough hingeBOT
silver anvil
#

I think I can achieve the same result with Stripe using a checkout session and passing the internal order id in the subscription_data.metadata field since that will be sent in every invoice.payment_succeeded webhook to match the successful payments that way.
Not sure if that field persists to Invoice objects. Probably worth testing.

#

Do you need to handle every recurring payment/event in your webhook or just the initial one?

#

'm interested in the upsell feature, if a customer decides to add a one-off purchase through upsell to their subscription checkout session, how do you recommend I find out what they have purchased from a webhook as there wouldn't be a row in our internal orders table for the upsold item
Depends on what events you're listening for and your Checkout parameters. The line_items field on the Checkout Session object contains all items from the payment.

#

For the upsell there'd be an additional line item on the initial Invoice too

frigid hazel
frigid hazel
frigid hazel
silver anvil
#

You probably won't receive an invoice.payment_succeeded event for one-off payments

frigid hazel
#

Thanks for the help, really like this format

silver anvil
#

Also, we generally recommend invoice.paid as opposed to invoice.payment_succeeded – the latter doesn't account for scenarios where there is no payment (i.e. 100% discount etc)

frigid hazel
silver anvil
#

For one-time payments, you'll just want a checkout.session.completed event

frigid hazel
silver anvil
#

Yep, seems logical