#_api

1 messages · Page 1 of 1 (latest)

pseudo pollenBOT
#

đź‘‹ 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.

rapid vaporBOT
#

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.

restive iris
#

Hello

narrow owl
#

Hello

restive iris
pseudo pollenBOT
narrow owl
#

which fields would I set to be true for the payment information to be prefilled? the document doesn't state it clearly

unique elbow
#

What do you mean? You just need to pass the customer id to prefill the payment method

narrow owl
#

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

unique elbow
#

No problem

#

All the above has to be true though. ie you need valid billing details on the payment method to show

narrow owl
#

Hello, so I tried this and it didn't work

#

This is a test customer so none of the details here are real

unique elbow
#

Can you share the checkout session creation request where you tried this

narrow owl
#

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)

unique elbow
#

Sorry I mean the request id

narrow owl
#

oh okay, one sec

#

req_SL9rW1DriPBBri
req_NzJB7jh0fGngE5

#

I made two of them, neither worked

#

SL is the older one

unique elbow
#

There's no billing details on the payment method

narrow owl
#

wdym?

unique elbow
#

Per the doc I sent you earlier: A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.

#

The payment method attached to your customer does not have that