#chanlk
1 messages · Page 1 of 1 (latest)
You can use the subscription's pending_setup_intent to collect a payment method for this subscription https://stripe.com/docs/api/subscriptions/object#subscription_object-pending_setup_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
like this?
No you don't create a setup_intent, the resulting subscription will have a pending_setup_intent if it doesn't require immediate payments
I just discovered that a PaymentIntent is automatically created one hour after the Invoice is generated. Is it possible to create a PaymentIntent immediately? I need to make a payment for the SubscriptionSchedule right away.
You can listen to invoice.paid event and finalize it. A PaymentIntent will be created once an invoice is finalized and its amount is > 0
I can provide a subscription ID (sub_1OOy1MKn5c1ZzBSkqhPa6aG7), but its Invoice status is 'draft', and the user has no payment information. Next, I want to complete the payment for this subscription. As a front-end developer, how should I go about completing the payment for this subscription?
You need to ask your backend engineer to finalize the inovice, and send invoice->payment_intent->client_secret to frontend so that you can render the payment-element
is the invoice finalized?
no, is draft
As I said, you need to finalize it first