#nazarpashkevych_36510

1 messages · Page 1 of 1 (latest)

late oracleBOT
#

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.

late osprey
#

Hello

#

Looks like you are maybe trying to create a one-time Charge to collect a PaymentMethod and then start a Subscription afterwards?

upbeat kettle
#

yup

late osprey
#

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

upbeat kettle
#

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

late osprey
#

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

upbeat kettle
#

for bancontact and card the id will be somewhere in details, correct?

late osprey
#

You'll need to give a little more detail than that

#

What do you mean "in details"?

upbeat kettle
#

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?

late osprey