#hamid-sofort-cannot-be-saved
1 messages · Page 1 of 1 (latest)
Apologies on the delay.
What advise are we looking for on that error?
@limpid rock again, apologies for the delay here. Why are you trying to attach a sofort payment method to a customer? Are you trying to make a recurring payment with sofort?
sure
i am trying to charge it later
for that i save payment_method in db and also attach it with customer
like i did for sepa
for sepa, what i did was, I attached payment_method with customer and then used it for charge later
So sofort itself doesn't support that, you basically use sofort to set up sepa for future payments
yup, i am following this doc already
so we can not attach multiple payment_methods(of sofort) with customer
and when we need to charge we can only use that payment_method_id to create payment_intent(charge)
So which step are you getting that error at?
And when you say you cannot attach multiple, does that mean you can do this once but the second time is when you get the error?
no no, I mean for credit card and for sepa, I save/attach payment_methods with customers
but when i try to attach sofort payment_method with customer I got that error, so it clearly sys we can not
attach sofort payment_method with cusotmer
I think attachment is just to list down all the accounts
@limpid rock it doesn't make sense to attach a Sofort PaymentMethod today since it can not be re-used, it's single use
Single use means, if we use it for later payment, still it can be used only once?
there's no "later payment"
Sofort is use once, synchronously. You want to take a 10€ payment, you confirm with sofort, get redirected to their website/app, approve, and then done
you can't "save a Sofort PaymentMethod for later"
Sofort is one-time use. If you accept a payment with Sofort, you get a Sofort PaymentMethod pm_123456 and that is one-time use and can't be attached.
Now there's a feature that can also give you a separate SEPA Debit PaymentMethod that would be pm_ABCDEF, completely unrelated to the one above. That one is for SEPA Debit and can be charged multiple times
So now, if you accept a 10€ payment with Sofort, the PaymentIntent is associated with pm_123 for Sofort, and in turn, if you also passed setup_future_usage: 'off_session' we know you want SEPA debit and we will create a new PaymentMethod for SEPA Debit and that one will be attached to the customer
So sofort becomes sepa debit if we pass future usage, right? And then the generated payment method can be attached
And the one I could attach is coz it was not generated by using future usage.
Right?
I don't understand that sentence
but there are two separate PaymentMethod objects
that's what seems to be confusing you in this case
Let me restate
One is simple flow for sofort
And other in which sofort becomes sepa direct debit
To achieve 2nd flow, we need to pass off_session
And after we pass this we will be getting a payment_method which can be attached and can be used for multi payments
yes that thing is not the Sofort PM. It's the SEPA Debit one
there's no "authenticated as sofort". But they will pay via Sofort the first time yes
Point here is customer will be redirected to the site, there customer will authenticate account and will be redirected back to our site, and if we have passed off_session, we will get payment method of sepa debit
correct