#Tiziano-checkout-prefil
1 messages · Page 1 of 1 (latest)
Hello 👋
Looking into this
If you are correctly passing the customer ID to the Checkout Session, In 'payment' mode it should prefill the email, name, card details, and billing address on the Checkout page.
I'm using a wrapped curl extension
I'm not super familiar with that but yeah please share the relevant code
<cfhttp url="#url_session#" method="POST" charset="utf-8" result="objGet">
<cfhttpparam type="header" name="Authorization" value="Basic #ToBase64(token)#" />
<cfhttpparam type="formfield" name="customer" value="#customer_id#" />
<cfhttpparam type="formfield" name="success_url" value="#success_url#" />
<cfhttpparam type="formfield" name="cancel_url" value="#cancel_url#" />
<cfhttpparam type="formfield" name="mode" value="payment" />
<cfhttpparam type="formfield" name="payment_method_types[]" value="card" />
<cfhttpparam type="formfield" name="line_items[][name]" value="#items_name#" />
<cfhttpparam type="formfield" name="line_items[][images][]" value="#application.stripe_return_url#/assets/img/logo%202.png" />
<cfhttpparam type="formfield" name="line_items[][description]" value="#items_description#" />
<cfhttpparam type="formfield" name="line_items[][amount]" value="#items_amount#" />
<cfhttpparam type="formfield" name="line_items[][currency]" value="#items_currency#" />
<cfhttpparam type="formfield" name="line_items[][quantity]" value="#items_quantity#" />
</cfhttp>
Actually, can you share the request ID for the checkout session? It should look something like req_123xyz
req_FvPdNVixUqtfPI
In payment mode, the customer’s **most recent card payment ** method is used to prefill the information. The customer you're testing with doesn't have a successful payment.
So you can try creating a new customer with Checkout session, make a payment and then create a new checkout session with that customer. That new checkout session should have the information prefilled.
OK i understand, so is not possible to pre-fill without a success payment is this correct?
Ok thank u
NP! Happy to help 🙂