#shadowjakey
1 messages · Page 1 of 1 (latest)
Hi. Can you explain a little more what you mean by this?
@obtuse turtle when I create a checkout session using the customer id that has a stored payment method, the stored payment method does not come up in the checkout session page, it prompts you to manually input card numbers again
Recommend taking a look at https://www.youtube.com/watch?v=HrqSXUzW7_w for how to do this
In this episode, you'll learn from Matt about how to prefill the card, with a previously saved card in Checkout, when a user returns to your site.
Presenter
Matthew Ling - Developer Advocate at Stripe - https://twitter.com/mattling_dev
Resources
Official client library: https://github.com/stripe/stripe-ruby
Official documentation:
h...
@obtuse turtle thank you for the reccommendation, but that still requires the first time input of card information, is there no way to use the card on the customer id's account?
If they already have a card set up for future usage, I think that should be prefilled as well. Possible I'm wrong though
Can you share the checkout session id so I can take a look?
cs_ starts with that
cs_test_a13d4au0uIunGOY2uwwblxWZbLBVf6l9ZQfHyCtQxcmifwg3I99zrf7KbU
@obtuse turtle Thank you for helping me out
Ah so I think it may be because that customer's card was only previously set up for off_session usage. See: https://dashboard.stripe.com/test/logs/req_sxMZsuok53ElkK
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
In the video I shared, Matt sets up the card for on_session usage
So I recommend creating a new SetupIntent and payment method for that customer setting future_usage to on_session
Then create a new Checkout Session and see if the card is prefilled
The customer sets their card information throught the stripe billing portal, how do I set the setupIntent from future_usage to on_session in the customer portal?
Ah ok this is through the billing portal
Let me check with a colleague on this. Not sure why it's not being prefilled
Thank you so much for the help, I appreciate it, let me know what you find out, I've been searching through the documenation on it and the only thing I've seen is that if you pass the customer Id in in the create.checkout.session function, it should prefill it
Yeah. Will get back to you
They got back to me and said for the checkout PM prefill to work the PM has to have billing_details.name and billing_details.email populated
ie this part: https://stripe.com/docs/api/payment_methods/object#payment_method_object-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How do I set that in the checkout session create / billing portal?
When creating the payment method, you need to provide email and name
I kinda understand, the payment method stored under the customer is missing the name, but in the billing porta, when you enter card information, there's no input for name
Yeah so unfortunately those PMs won't be prefilled then
That's just how the Checkout prefilling works currently
i see what you mean, could that mean it is a bug in the customer portal?
if so, that is really interesting
No the customer portal just doesn't currently collect name and email there
Would need to be a feature request
We call out the name and email requirement here actually:
A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
i see, but that's weird how in the customer portal it does not require the customer to fill in the name and email
Yeah because those aren't really required fields for most things
This is just a niche requirement for prefilling in Checkout
I see, thank you for helping me out
No problem