I am working on recurring payment intent, when i am trying to Charge the saved card later Server-side
, I am getting this response :
Array
(
[error] => Array
(
[message] => You cannot attach a PaymentMethod to a Customer during PaymentMethod creation. Please instead create the PaymentMethod and then attach it using the attachment method of the PaymentMethods API.
[type] => invalid_request_error
)
)
for that i have use curl method
curl https://api.stripe.com/v1/payment_methods \
-u ********: \
-d customer="{{CUSTOMER_ID}}" \
-d type=card
Can anyone please help me how to resolve this issue ? I have refer this page
https://stripe.com/docs/payments/save-and-reuse
I encountered the same problem.. according to their docs, we need to first create a payment method and then attach it with the customer. Though, don't know then why they have provided customer field
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With