#andrea-skuola-default-pm
1 messages ยท Page 1 of 1 (latest)
HI ๐ you can define the default payment method that should be used for invoices and subscriptions by updating the customer record, particularly the invoice_settings.default_payment_method field:
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-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.
If the user creates a subscription independently and inserts in the stripe payment form a card that I want to make it the default for future purchases as well, can I do this?
It won't be used as the default for one-time payments automatically, but you can reference that field on the customer when creating payments and pull the payment method ID from it.
But when a customer pays something, his payment method used, is attached to him automatically? So I only need to get the pm ID and put it in invoice_settings.default_payment_method field
Correct