#hamid-sofort-cannot-be-saved

1 messages · Page 1 of 1 (latest)

ocean bay
#

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?

limpid rock
#

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

limpid rock
#

for sepa, what i did was, I attached payment_method with customer and then used it for charge later

ocean bay
#

So sofort itself doesn't support that, you basically use sofort to set up sepa for future payments

limpid rock
#

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)

ocean bay
#

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?

limpid rock
#

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

frank wasp
#

@limpid rock it doesn't make sense to attach a Sofort PaymentMethod today since it can not be re-used, it's single use

limpid rock
#

Single use means, if we use it for later payment, still it can be used only once?

frank wasp
#

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"

limpid rock
#

Wait a sec

#

What does it say?

frank wasp
#

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

limpid rock
#

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?

frank wasp
#

but there are two separate PaymentMethod objects

#

that's what seems to be confusing you in this case

limpid rock
#

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

frank wasp
#

yes that thing is not the Sofort PM. It's the SEPA Debit one

limpid rock
#

But, client will be authenticated as sofort

#

Right?

#

By redirecting and all

#

?

frank wasp
#

there's no "authenticated as sofort". But they will pay via Sofort the first time yes

limpid rock
#

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

frank wasp
#

correct

limpid rock
#

And if we will not pass off_session it will be simple sofort 1 time payment

#

Thanks a lot