#_api
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1273647130258702349
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- _customer-portal, 1 day ago, 7 messages
Hello
Hello
You can prefill the payment method if you pass a Customer ID and the things that we state at https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer are true
which fields would I set to be true for the payment information to be prefilled? the document doesn't state it clearly
What do you mean? You just need to pass the customer id to prefill the payment method
oh I missed that bit, my bad! I thought we had to set certain fields to be true to have it be filled
thanks for clarifying
No problem
All the above has to be true though. ie you need valid billing details on the payment method to show
Hello, so I tried this and it didn't work
This is a test customer so none of the details here are real
Can you share the checkout session creation request where you tried this
sure
args = {
'client_reference_id': client_id,
'customer': customer_id,
"customer_update": {
"address": "auto",
},
'success_url': "https://control.binaryedge.io/sign-in/",
'line_items': [
{
"price": price_id,
"quantity": 2,
"adjustable_quantity": {"enabled": True, "maximum": 999, "minimum": 0},
}
],
'automatic_tax': {"enabled": True},
'mode': "subscription",
'subscription_data': {
'metadata': {'client_id': client_id, 'user_id': 'sakina gadriwala'},
},
'billing_address_collection': "auto",
'payment_method_collection': "if_required",
'payment_method_data': {'allow_redisplay': 'always'},
'saved_payment_method_options': {'allow_redisplay_filters': ['always']},
}
l = stripe.checkout.Session.create(**args)
Sorry I mean the request id
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
oh okay, one sec
req_SL9rW1DriPBBri
req_NzJB7jh0fGngE5
I made two of them, neither worked
SL is the older one
There's no billing details on the payment method
wdym?