#Kikkoman

1 messages · Page 1 of 1 (latest)

polar tapirBOT
gilded sequoia
trim cove
#

So the flow would be 1) customer completes the checkout session in setup mode 2) system retrieves the completed checkout session and retrieve the paymentintent(?) 3) system assign the paymentintent into the customer's default source (or should it be invoice_settings default payment method?)

gilded sequoia
#

You can set it on the Customer via invoice_settings. You just need the payment method ID from the Customer or the Payment Intent

trim cove
#

after setting the invoice_settings.default_payment_method for a customer. This is the prefilled payment method when we do a checkout session in payment mode correct?

gilded sequoia
#

I don't understand the question. Can you elaborate?

trim cove
#

so what we want is that when we setup a new checkout session in payment mode for an existing customer, their default payment method would be prefilled

#

is this default payment method coming from customer.invoice_settings.default_payment_method?

gilded sequoia
trim cove
#

hmm, i'm not sure how that applies here.

gilded sequoia
#

You said you want Checkout to prefill the customer's payment method details, right?

trim cove
#

right

gilded sequoia
#

So you create a Checkout Session in setup mode, then you send them another Checkout Session later in payment mode, correct?

trim cove
#

yes

gilded sequoia
#

Okay, now I understand. So, Link would do the same thing a lot faster/easier, but if you want to prefill the card details, you can pass the Customer ID when you create the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer

Read through that parameter description and let me know if that does what you're looking for

trim cove
#

ah, i think i missed out somethign on the documentation

#

yeah, we are looking to pass in the customer ID

#

and the API doc inidicates that it uses the invoice setting default payment method

#

so I think we're good

#

thanks