#nepotist84

1 messages ยท Page 1 of 1 (latest)

analog hornetBOT
next pier
vocal scaffold
#

Hi! Let me help you with this.

#

I don't think I follow what you're trying to do. Do you want to charge the PaymentMethod automatically? Or send Invoices for the customer to pay each time on their own?

next pier
#

Sure, it's definitely complicated so I will try to clarify... ๐Ÿ˜„

#

I am trying to send a subscription invoice to the customer to pay with sofort, then save their IBAN so I can charge them automatically on later invoices.

My process now is:
Create a subscription with 'sofort' as a payment_method_type and collection_method 'send_invoice'

Update the payment_intent to 'setup_future_usage' = 'off_session'

Try to pay the invoice with sofort

#

I expect that the IBAN would be saved as a sepa_debit payment method on the customer

vocal scaffold
#

I would recommend not mixing those and create a separate SetupIntent or a Checkout Session with mode "setup" to collect the PaymentMethod for future usage

next pier
#

Can I use the SetupIntent and 'send_invoice' collection_method?

#

My impression is that SetupIntents work when the customer is on_session

#

To begin

vocal scaffold
#

SetupIntent is a one-time thing for collecting PaymentMethods for future usage.

#

But maybe you could describe what user flow you imagine (without Stripe concepts), and I will try to suggest the best solution.

next pier
#

I need to take care of something offline briefly.... 5 minutes max

#

Can we leave the chat open and I will be right back?

vocal scaffold
#

Sure

next pier
#

Okay, so I would like to be able to send a customer an invoice through stripe that offers three payment methods: card, paypal, and sofort. The goal is to collect their payment method preference and update a subscription to charge that payment method automatically in the future.

#

So the customer receives an invoice from stripe in their email, they choose to pay with card/paypal/sofort, we save that choice to their subscription so they can be charged automatically

vocal scaffold
#

You will then be better off creating a Checkout Session with mode: "subscription".

next pier
#

Hmmm

#

Okay, I haven't explored Checkout Sessions at all

#

๐Ÿ˜„

vocal scaffold
#

The Subscription will be charge_automatically by default, and, initially, the customer will get the payment page where you will add their preferred payment method.

next pier
#

Can this work for an existing subscription too? To update the payment method?

vocal scaffold
#

Just one note: Checkout Session URLs expire. So if you want to send it in the email, I would recommend sending a URL to your own website, that will create a fresh Checkout Session on the fly and redirect the customer to it.

next pier
#

Understoof

#

understood

vocal scaffold
next pier
#

Very nice

#

Okay, I will check these out... pun intended.

vocal scaffold
next pier
#

Thanks for the help

vocal scaffold
vocal scaffold
next pier
#

Yeah, awesome

#

Have a great day

vocal scaffold
#

You too!