#niteesh-unpaid-subscription

1 messages · Page 1 of 1 (latest)

half kindle
#

Hi there 👋 can you tell me a bit more about what you're trying to accomplish? I believe unpaid is a terminal state for a Subscription, but am working on double checking that.

remote kiln
#

The subscription status is unpaid as the attemp to collect payment using default payment method failed.
I read somewhere in the documentation, if I pay the the invoice that is connected to the subscription the status will switch back to active.

So how can I pay the invoice by collecting new card details using stripe payment element.

half kindle
#

Gotcha, thank you for that.

You can retrieve the most recent invoice for the Subscription by viewing it's latest_invoice value:
https://stripe.com/docs/api/subscriptions/object#subscription_object-latest_invoice

This will allow you to retrieve that Invoice, so that you can locate it's underlying Payment Intent:
https://stripe.com/docs/api/invoices/retrieve
https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent

That Payment Intent will contain a client_secret value that you can use when initializing the Payment Element.
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret

remote kiln
#

Seems clean and simple, thank you so much.

half kindle
#

Any time!