how to customize the checkout button && autofill shipping address?

Highlighted
New Member
2 0 1

hi,

I am building a public embed app to auto-fill the shipping address in the checkout page. For that, I added scriptTag with javascript in the cart page that takes customer's input address which will be used for auto-filling in the next checkout page when customer clicks 'checkout' button.

 

Two questions

1) how to send the input data to my backend server when customer clicks checkout button? Can we customize the checkout button with ScriptTag to act like sending customer input data to my backend and redirect her to the next checkout page?

2) how to autofill the customer-provided shipping address when customer is redirected to the next page (checkout page)? 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
79 8 11

Hey @Alex1234,

Check out the Storefront API for the ability to create a checkout with the checkoutCreate mutation that takes a shippingAddress as an input field.

Callum | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes