#Tiziano-checkout-prefil

1 messages · Page 1 of 1 (latest)

river abyss
#

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.

pure lake
#

I'm using a wrapped curl extension

#

can i share my code?

river abyss
#

I'm using a wrapped curl extension
I'm not super familiar with that but yeah please share the relevant code

pure lake
#

<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>

river abyss
#

Actually, can you share the request ID for the checkout session? It should look something like req_123xyz

river abyss
#

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.

pure lake
#

OK i understand, so is not possible to pre-fill without a success payment is this correct?

river abyss
#

Yes

#

That's correct

pure lake
#

Ok thank u

river abyss
#

NP! Happy to help 🙂

pure lake
#

I'm confused now i have completed a payment

#

With same customer i have created a new session ( req_LSSV9fHLEroUoY )

#

But i still don't have pre-fill on card