#jojilede
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Once you create a test customer via test clock, you can click on the customer and create a payment method using the dashboard
I see so I cant hard code it on the code?
Ah you are asking about doing this via the API? Hmm.. It should be possible.
I think you can pass one of the PaymentMethod IDs listed here when you create a customer
https://stripe.com/docs/testing?testing-method=payment-methods#cards
i.e.
payment_method: 'pm_card_visa',
invoice_settings: {
default_payment_method: 'pm_card_visa'
}
})```
haven't tested the code above so it might be a little diff
oh yeah I tried that and I get an error that says payment method is already assigned to a customer ๐
oh wait
let me check that
it worked ๐
i misread the pm_card_visa to be any payment id I previously setup
Ah, NP! ๐ Glad I could help
you are always helpful, I pretty know alot of stripe and almost answer some threads here bc of your help guys.thank you!
Happy to help ๐