CHECKOUT URL
This documentation is a public approach of Tapbuy Checkout URL. It allows retailers and publishers to trigger the Tapbuy Web Checkout funnel in a webview component of a mobile app and in any web browser.
Notes ¶
About routing
The customer will be routed to a different step of our checkout funnel according to the given parameters described below. By default, the user is redirected to the view-product endpoint. After the product attributes are validated by the user, the contact-information endpoint is triggered.
The view-product endpoint can be skipped to access directly to contact-information
(set skip_view_product
parameter to 1). If the product is not available (for a
specific attributes combination), the view-product endpoint is not skipped
and an error message is diplayed.
In contact-information, if user email or phone number is recognized, the connection form is automatically displayed in place of the registration form.
If the user is already logged-in, contact-information endpoint is skipped and the payment endpoint is triggered.
Finally, for a logged user, with skip_view_product parameter set to 1, the payment endpoint will be directly displayed (assuming there is no stock issue with given attributes combination).
Parameters
Security parameters related to the SDK and the client application are mandatory. Optional parameters can be added to the checkout requests.
All user_*
parameters can be used to automatically fill the registration form
(contact-information endpoint), for instance address fields in
user_*
parameters are used to fill a billing address.
In order to use a different address for shipping, use the
shipping_*
parameters (by default shipping_*
parameters are the
same as billing_*
parameters).
Parameters of array type will produce a URL fragment:
voucher_codes[0]=VOUCHER01&voucher_codes[1]=VOUCHER02
Host
The host URL can either indicate “publisher” or “retailer” mode.
Publisher mode
https://:publisherId.tapbuy.io/:method/:retailerId
The host for publisher mode follows the pattern above, publisherId
parameter is
the identifier / URL name of the publisher. A publisher calls must be passed along with the
retailerId
as shown above.
Retailer mode
https://:retailerId.tapbuy.io
The host for retailer mode follows the pattern above, retailerId
parameter is
the identifier / URL name of the retailer.
Endpoints ¶
Checkout ¶
Checkout
GET/checkout/:product_id/:combination_id
Example URI
- product_id
number
(required) Example: 1The ID of the product
- combination_id
number
(optional) Example: 1The ID of the combination
- sdk_version
string
(optional) Example: 1.0SDK version
- tapbuy_app_id
string
(optional) Example: 1234ID of the registered Tapbuy app
- app_bundle_id
string
(optional) Example: com.tapbuy.sampleBundle identifier of the host app
- os_name
string
(optional)OS name of the device
Choices:
ios
android
- os_version
string
(optional) Example: 9.3OS version of the device
- os_locale: `en_US`
string
(optional)OS locale of the device
- device_info
string
(optional) Example: iPhone 5cInformation about the device.
modelName
for iOS orbrand|model|device|Width[x]Height|density
for Android- user_email
string
(optional) Example: elon@teslamotors.comThe email of the user
- user_firstname
string
(optional) Example: elonThe firstname of the user
- user_lastname
string
(optional) Example: muskThe lastname of the user
- user_address
string
(optional) Example: 1, infinite loop streetFirst line of the user address
- user_address2
string
(optional) Example: 2nd floorSecond line of the user address
- user_zipcode
string
(optional) Example: 75002User zip code
- user_city
string
(optional) Example: ParisUser city
- user_country
string
(optional)User country code
Choices:
fr
- user_phone
string
(optional) Example: 0623456789User phone number
- shipping_firstname
string
(optional) Example: elonThe firstname of the user for shipping
- shipping_lastname
string
(optional) Example: muskThe lastname of the user for shipping
- shipping_address
string
(optional) Example: 1, infinite loop streetFirst line of the user address for shipping
- shipping_address2
string
(optional) Example: 2nd floorSecond line of the user address for shipping
- shipping_zipcode
string
(optional) Example: 75002User zip code for shipping
- shipping_city
string
(optional) Example: ParisUser city for shipping
- shipping_country
string
(optional)User country code for shipping
Choices:
fr
- shipping_phone
string
(optional) Example: 0623456789User phone number for shipping
- skip_view_product
number
(optional) Example: 1Set to
1
or0
to skip the product page or not.0
by default if omitted.- display_options
string
(optional) Example: similar|complementaryDisplay option tokens separated by a pipe among:
similar
,complementary
. If omitted, a display option is disabled by default.- voucher_codes
array[string]
(optional)List of voucher codes to apply.
- debug
number
(optional) Example: number: `1`Set to
1
or0
to enable the debug mode: unlocks technical custom error messages.0
by default if omitted.
200
Headers
Content-Type: text/html
Link ¶
Link redirect
https://link.tapbuy.io/?url={https://retailer.com/p/123}
In order to trigger the Tapbuy checkout experience from the Tapbuy product page you can
prefix the encoded product page URL with
https://link.tapbuy.io/?url=
. Tapbuy will find the tapbuy product page URL for
you and redirect the user to it.