#renraj
1 messages · Page 1 of 1 (latest)
Hi there!
If the payment method is set as the default for the customer (https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or the subscription (https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method), then yes it will be used automatically.
However your flow seems quite complex. It's much easier to directy create the Subscription and then collect the payment method, as described here: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
ok Soma
As you said "directy create the Subscription and then collect the payment method"
can you show where is that part in the given link?
First create the subscription: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
Then collect the payment method: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
In this way, we need to confirm the payment from Frontend rite?
Correct
ok
As per the step I mentioned, If I go to stripe Dashboard and under "customer", I couldn't see the Default Payment Method
If I go to "payment" tab and can see the card details done for that Subscription
I couldn't see the Default Payment Method
Then you need to update the customer to set it: https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
By setting
var suboptions = new SubscriptionCreateOptions
{
Customer = customerResponse.Id,
Items = subscriptionItemOptions,
DefaultPaymentMethod = request.PaymentMethodToken
};
in c# code, itself will set the CC details and will taken up for renewal rite? Rather than setting default_payment_method in Customer?
Yes, that's what I said earlier:
If the payment method is set as the default for the customer (https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or the subscription (https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method), then yes it will be used automatically.
ok Thank you...Let me try the existing setup and let u know