#phonicuk

1 messages · Page 1 of 1 (latest)

scenic pendantBOT
dense gust
#

hi! well you shouldn't use that event at all. you should be listening to invoice.paid instead to get notified of payments on the subscription.

lean vigil
#

ooh?

dense gust
#

payment_intent.payment_succeeded could be anything(any payment on your account) so you'd need a bunch of logic to know what it's relating to

lean vigil
#

aye I look up the invoice for the intent and work it out that way

dense gust
dense gust
lean vigil
#

I have a mixture of subscriptions and one-time payments

dense gust
#

in any case to answer your initial question, each recurring invoice creates a new PaymentIntent object.

lean vigil
#

what about the associatedTransactionId on the invoice object? Does that change each time?

#

wait disregard

#

thats not a stripe thing

#

okay thanks!

#

Does the invoice object on InvoicePaid include the subscription information or do I need to query it?

dense gust
#

it has a subscription field which is the sub_xxx ID

#

you can call the Subscription Retrieve API with that if needed