#nazarpashkevych_36510
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- nazarpashkevych_36510, 4 hours ago, 19 messages
- nazarpashkevych_36510, 1 day ago, 24 messages
- nazarpashkevych_36510, 1 day ago, 5 messages
Hello
Looks like you are maybe trying to create a one-time Charge to collect a PaymentMethod and then start a Subscription afterwards?
yup
Okay you are close but you are trying to use the PaymentMethod ID associated with the iDEAL PaymentMethod which is one-time-use only
What you want is the PaymentMethod from the payment_method_details.ideal.generated_sepa_debit on the Charge object
That is the SEPA Debit PaymentMethod
And the one that is actually attached to the Customer for re-use
Hm, but user can use card or bancontact, what should I use in this case? I mean that I have a several payment options, and I don`t know exactly what user selected during the charge
Right so after the Charge and before you create your Subscription you need to check
An easy way would be to just list PaymentMethods for the Customer if you only expect them to have one PaymentMethod attached
Otherwise you need to look at the Payment Method type that was used for the PaymentIntent
for bancontact and card the id will be somewhere in details, correct?
I mean somewhere in array payment_method_details
I found for bancontact it is payment_method_details.bancontact.generated_sepa_debit, but what should I use for card payments as default_payment_method?
For card it will just be the payment_method within the Charge: https://stripe.com/docs/api/charges/object#charge_object-payment_method