#kanonhian
1 messages · Page 1 of 1 (latest)
Can you share the ID of a request (req_xxx) where you encountered that error?
Thank you, in that request it looks like you're trying to set the Customer's default payment method. Doing so does not first attach the Payment Method to the Customer, it must already be attached to them.
You would need to use this first to attach the Payment Method:
https://stripe.com/docs/api/payment_methods/attach
However, using our Setup Intent approach would likely be better for creating and attaching Payment Methods to your Customers:
https://stripe.com/docs/payments/save-and-reuse
thanks
thing is I do not create the payment method
I receive it via API
and its suppossed to be one time payment
not future usage
anyway i will take a lokk
look
thanks
Hm, it looked to me like you were using the createPaymentMethod from stripe.js to create the Payment Method:
https://stripe.com/docs/js/payment_methods/create_payment_method
Oh, for a one-time payment you could use this flow which uses a Payment Intent:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Thanks, same to you!