#David Gallardo-php

1 messages · Page 1 of 1 (latest)

torn osprey
#

Hi! What do you meant by "checkout portal"? Is this a Checkout Session ?

sage yacht
#

Yes, Checkout Session, i send customer in request and checkout no set the default payment

torn osprey
#

You would like to see the default payment method of the customer pre-filled on the Checkout Session page?

sage yacht
#

Yes

torn osprey
#

Got it! Can you share the Checkout Session ID or request ID ?

sage yacht
#

Request ID in Test: req_JvroNUD9Q5G3Yw

#

Session: cs_test_b1WKa2gmpUYWsFBSQqJUiG3mvjybSy9Gaf0rKWoToX0swfQpFVsPSllzYE

torn osprey
#

Thanks! I just made some tests on my end, and I confirm that passing a customer with a default payment method won't prefill the card information on the Checkout page.

#

For this to work you need to:

  1. create a Checkout Session with payment_intent_data: {setup_future_usage: "on_session" } and let the customer complete the payment by entering their details
  2. later, create another Checkout Session for that customer, and now the card information will be prefilled.
sage yacht
#

But the card has been added through Stripe Checkout

torn osprey
#

You link you just shared is not called Stripe Checkout but Customer Portal.

#

So the customer added their card on the Customer Portal, and then when creating a Checkout Session you would like to see the card details pre filled?

sage yacht
#

Yes

torn osprey
#

Give me a few minutes, I'll try to reproduce.

#

Yes, I used the Customer Portal to add a default payment method, and then when creating the Checkout Session the card details are not prefilled. So that's expected, but I can send that feedback internally.

#

Note that if you already have a payment method saved for the customer, you don't really have to use Checkout Session. You could also directly create a PaymentIntent with the payment_method and confirm: true to directly charge the customer.

sage yacht
#

I need the customer to be able to see what they are going to buy. Also I need a place where I can remove the cards.

torn osprey
#

Got it. Unfortunately with your setup it's not possible to prefill the card information.

sage yacht
#

Can you send this information to the developers so they can consider it as an improvement?