#Gautam-PI
1 messages ยท Page 1 of 1 (latest)
what could be the reason for this ... it could be ach was not verified before inititaing the subscription
?
I notice the relative customer for the invoice has a default PaymentMethod, if you were to include this PaymentMethod when creating the Invoice/Subscription, this should be attached to the relative PaymentIntent
what should be the right way ?
For your reference: https://stripe.com/docs/api/invoices/create#create_invoice-default_payment_method
and https://stripe.com/docs/api/subscriptions/create#create_subscription-customer (where this CustomerId links to a Customer where PaymentMethod is already defined)
Are you trying to create a subscription service?
If so, I would recommend the flow to be:
When customer login to your website, create a Customer object https://stripe.com/docs/api/customers/create then capture a PaymentMethod https://stripe.com/docs/api/payment_methods/create and attach it to the Customer https://stripe.com/docs/api/payment_methods/attach. When the customer signs up for a subscription, parse this CustomerId into the create subscription endpoint linked above ๐
Thanks a lot ..๐