Pre-Fill Checkout Info
Pre-fill SellApp checkout fields with query parameters for coupons, email, payment method, quantity, variants, and custom fields.
At times, you might want to pre-fill the product page with a customer's checkout information.
A good example is when you want to redirect a customer from your own project to the checkout page in order to reduce the risk of mistakes during checkout.
With SellApp, you can do so by appending the URL with the appropriate query string variables. This helps when you already know the buyer's email, product variant, quantity, coupon, or preferred payment method.
Supported variables
At present, the following query string variables are supported:
couponAny coupon code you would like to have automatically appliedemailThe customer's email addresspayment_methodThe payment method with which the customer will pay. For built-in methods, use the gateway value such asSTRIPEorPAYPAL. For custom payment methods, use the full custom method value shown by SellApp.quantityProduct quantity which the customer will be purchasingvariantIf there is more than one variant, you can specify a specific variant IDadditional-[key]The key and value of a checkout info field (you can copy the key when creating/editing a checkout info field)
Looking for a variable that's not in the above list? Send us a message by contacting us via live chat (found at the bottom right hand corner of this page)
Checkout Example
Your website is all about rare game skins. Logged in customers can browse and purchase these game skins. One of your customers, John Doe, wants to purchase one of these skins and clicks on it to be redirected to the SellApp checkout page.
Rather than sending John to the default URL https://example.sell.app/product/rare-game-skin you could modify the URL with the customer's information you already have on your end.
Say they have a preferred payment method, are a recurring customer eligible for a 5% discount coupon, and they modified the quantity input to 2 rare game skins. Additionally, you have a custom checkout info "text" field that asks for the customer's in-game username.
You could then use this information and automatically modify the URL with the new query string variables.
The final URL would be: https://example.sell.app/product/rare-game-skin?coupon=LOYAL5&email=john_doe@example.com&payment_method=STRIPE&quantity=2&additional-4124bc0a9335c27f086f24ba207a4912=JohnDoe123
Embed modal variables
The query string variables above apply to SellApp storefront and product URLs. If you are using the embed modal on your own site, pass the same kind of data on the button instead.
For standard checkout values, use data-sell-* attributes such as data-sell-coupon, data-sell-email, data-sell-payment_method, data-sell-quantity, and data-sell-variant.
For custom checkout information fields, use data-sell-checkout-{fieldKey}. Copy the field key from SellApp; it is not always the same as the field label customers see at checkout.
<button
data-sell-store="123"
data-sell-product="456"
data-sell-email="john_doe@example.com"
data-sell-coupon="LOYAL5"
data-sell-quantity="2"
data-sell-payment_method="STRIPE"
data-sell-checkout-4124bc0a9335c27f086f24ba207a4912="JohnDoe123"
>
Buy now
</button>Embed checkout field values are parsed as JSON when possible, so booleans, numbers, arrays, and objects can be passed when a field type needs them. See Embed Digital Products for the full embed attribute list.