#lico_unexpected

1 messages ยท Page 1 of 1 (latest)

gaunt bobcatBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1232248380365864980

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

fast windBOT
weary prairie
#

๐Ÿ‘‹ happy to help

#

would you mind sharing the request ID that generated the Checkout Session?

cedar gyro
#

Is that cs_test_.. key?

weary prairie
cedar gyro
#

req_NLHts98bsu5voV

weary prairie
#

taking a look

#

the reason why the bank transfer is not available is because you need to pass in a customer ID to the Checkout Session creation so that this Payment Method is available

cedar gyro
#

Oh, okay, thank you, I'll try that now

#

Hmm, so I added 'customer' property to the checkout.create call, and when I get to checkout page I can see that customer information prefilled, but still bank transfer doesnt show up

weary prairie
#

would you mind sharing the request ID?

cedar gyro
#

req_YMciH8PKuLzjV6

weary prairie
#

oh how did I miss that ๐Ÿคฆ

#

this is a subscription mode Checkout Session

#

this means that only payment methods that support setup_future_usage will be showed

#

Bank Transfers is not a valid Payment Method that can be used to charge the customer in the future

cedar gyro
#

But in bank tranfer documentation it says bank transfers can be added to subscriptions

weary prairie
#

yes but this means you need to change the collection_method to send_invoice instead of charge_automatically

#

which is not supported by Checkout Sessions

cedar gyro
#

But that means we need to ask customer beforehand which option they want, and then conditionally create the session with different collection method, one for sepa/card/paypal, and another for bank tranfer?

#

I.e. we can't get all 4 options to show up to user at the same time in Checkout form

weary prairie
#

If they choose bank transfer then you need manually create the Subscription

cedar gyro
#

I see. Alright, thank you for clarifying this

#

Does this behavior differ for Payment Elements maybe, if we used that instead of Checkout? Basically, could all 4 options show up at the same time if we used Elements?

unkempt wren
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

What options specifically?

cedar gyro
#

We want to have Card, SEPA, Paypal and Bank transfer

unkempt wren
#

Yes, Payment Element supports all of it.

cedar gyro
#

This applies as well when its for subscriptions, yes?

unkempt wren
cedar gyro
#

Right I can see that bank transfer doesnt support SetupIntent. Does that mean that if Elements is configured with mode: 'setup' it wont be able to display bank transfer?

#

If so, which mode should I use to display all 4 at the same time?

unkempt wren
cedar gyro
#

And if I dont want one-time payments but only to set it up for subscriptions, what are my options, if any?

unkempt wren
#

Then you need to set collection_method: "send_invoice". Then the customer will need to pay on a hosted Invoice page, a link to which will be sent to them every cycle.

cedar gyro
#

Thats when starting an actual subscription right? But I'm asking before that point - when user is still choosing their payment method - we want them to see all 4 methods at the same time when they are buying our subscription. Can this be displayed like so? And after that, how will we be able to differentiate which subscription to start (send_invoice or charge_automatically)?

unkempt wren
#

No, you will not be able to display the payment method until you choose what kind of Subscription to create.

cedar gyro
#

Okay, thank you for clarifying that

unkempt wren
#

Happy to help.

cedar gyro
#

Oh. Could we maybe 'simulate' this through external payment methods in Elements? So we set up Elements for card/sepa/paypal with mode:'setup', but at the same time add an external payment method to it, through which we would discard the current setupintent (for card/sepa/paypal) and then create a send_invoice subscription behind the scenes?
Would that allows us to display all 4? (Well 3 actual ones and bank transfer as 'simulated' one)

unkempt wren
#

You can't customize Elements this much. A much easier workaround is to ask the customer how they want to pay in your own UI, and then depending on that, create a Subscription with "charge_automatically" and display the Payment Element, or just create a "send_invoice" Subscription directly.

cedar gyro
#

I see. Okay, thank you for your help

unkempt wren
#

Happy to help.