Which parameters are being passed to the checkout on Subbly?
Get access to checkout parameters
In this article you can find the list of all parameters that are being passed to the checkout. The parameters can be used to build a custom survey flow, directly on your website, and pass that info to checkout on the backend. As a result, this will help with having one less step during the checkout flow.
The list of parameters
Example of an URL with parameters - https://{custom.domain}/checkout/buy/(pr_id)?parameter1=value1¶meter2=value2
coupon - preselected coupon ID
currency - currency code (USD,EUR,GBP) to initialize the checkout. Ignored if currency is not available
customerEmail - populate customer's email in login and registration forms
gift - enables "This is a gift" toggle with any value provided
testMode - enables test mode when passed with value true
r - referral ID
quantity - quantity (applicable only for one-time products)
addon - is it an addon or not (applicable only for one-time products and if subscription product exists inside the purchase); Possible values (1,0)
duration - duration for the addon (applicable only with addon parameter/flag); Possible values (1 or empty) - 1 = only for the next shipment, empty = forever shipped
options - survey answers object
options.questions.*.questionID - id of the question
options.questions.*.type - the type of the question (text, select, quantity, multiple)
- if the type is text options.questions.*.answers = answers is be text or empty
- if the type is select options.questions.*.answers = answers is an answer ID
- if the type is multiple options.questions.*.answers = answers should be an array of answer IDs
- if the type is quantity options.questions.*.answers = answers should be an array with key of answer ID and value with quantity
How did we do?