#Suren
1 messages ยท Page 1 of 1 (latest)
Hello ๐
looking..
Ah it looks like neither the customer or the subscription have a default payment method set that can be used to charge the invoice to
does that help @cobalt cedar ?
and how can I solve that ?
You need to set a default payment method on a customer (customer.invoice_settings.default_payment_method) OR set a default payment method on subscription (subscription.default_payment_method)
subscription was create subscriptions.create method after that I send the client_secret in front side and how can I set default payment method ?
if the card number was fill front side
I thought when in front side client fill and send card information to the stripe it should be saved automatic
We only save it if you specify payment_settings.save_default_payment_method parameter
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but I think there isn't save_default_payment_method property
payment_method_types, payment_method_options only
payment_method_options?: PaymentSettings.PaymentMethodOptions;
payment_method_types?: Stripe.Emptyable<
Array<PaymentSettings.PaymentMethodType>
>;
}``` this is the interface stripe
What library are you using? It is possible that that field didn't get added until a late version
Yes you are right! it related to version sdk !