#daniqwlkd

1 messages · Page 1 of 1 (latest)

eternal sapphireBOT
pale mesa
#

Can you share invoice id?

agile lintel
#

Absolutely!

#

in_1OmbSmBD1BCvx8owzJFDmpm9

#

What I'm doing roughly:

  1. Create setup_intents and customers on the platform account.
  2. Post invoices to these customers, on behalf of connected accounts w/ destination transfers.
  3. Would like the invoice to be collected (charged to the default payment method of the customer) automatically by Stripe.
#

It looks like:

  1. I can charge customers just fine for the invoices via the dashboard
  2. When Stripe creates a payment_intent, it ends up in the "requires_payment_method" status.
#

this is how I create the invoices

#

(wip code, so bear with me)

pale mesa
#

Ah

#

So the customer didn't have a default payment method set at the time that invoice was attempted

#

I see you've corrected that though

agile lintel
#

🤦‍♂️

pale mesa
#

They now have a default set, so future invoices should succeed for them

agile lintel
#

OK, I'm gonna give it a quick run.

#

Ah, now it has a payment method. Super!

pale mesa
#

Yep!

agile lintel
#

Super, thank you.

#

I have one more:

#

This is how I make the checkout session, and collect the setup_intent with it.

#

Is there a way to make the checkout session set the collected payment method as default for the customer, or is that something to do manually after? (for example, once the webhook is triggered)

pale mesa
#

Yeah you'd do it in the webhook

#

Update invoice_settings.default_payment_method on the customer

agile lintel
#

Super, thanks a lot, have a good one! :^)