#Aarti-account-support
1 messages · Page 1 of 1 (latest)
@lusty bloom :question: Have a non-technical question, account issue, or need one-on-one support? We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Found this - https://stripe.com/docs/testing#test-code I will try to use PaymentMethod: stripe.String("pm_card_visa"),
Question - how do I attach an address to this payment method if I use pm_card_visa?
I want to basically attach a default payment ID to the customer
Can I just do ``` _, err = stripeClient.Customers.Update(customerID, &stripe.CustomerParams{
InvoiceSettings: &stripe.CustomerInvoiceSettingsParams{
DefaultPaymentMethod: stripe.String("pm_card_visa"),
},
})
Thanks! I find this above approach to be working but it looks like every time I want to use it to process a payment intent, I need to "re-add" the payment method using the above code snippet
The default you're setting above is only for Invoice payments. There is no default when using Payment Intents directly.
For Payment Intents you need to specify the Payment Method each time.
The idea would be to add the special test PM, like pm_card_visa, to the Customer once (ideally with a Setup Intent or a Payment Intent with setup_future_usage). That will create a new pm_... ID that's attached to the Customer than you can then specify for subsequent Payment Intents for that Customer.