Documentation

 Back to top

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

GET https://:hostId.tapbuy.io/checkout/:product_id/:combination_id
URI Parameters
HideShow
product_id
number (required) Example: 1

The ID of the product

combination_id
number (optional) Example: 1

The ID of the combination

sdk_version
string (optional) Example: 1.0

SDK version

tapbuy_app_id
string (optional) Example: 1234

ID of the registered Tapbuy app

app_bundle_id
string (optional) Example: com.tapbuy.sample

Bundle identifier of the host app

os_name
string (optional) 

OS name of the device

Choices: ios android

os_version
string (optional) Example: 9.3

OS version of the device

os_locale: `en_US`
string (optional) 

OS locale of the device

device_info
string (optional) Example: iPhone 5c

Information about the device. modelName for iOS or brand|model|device|Width[x]Height|density for Android

user_email
string (optional) Example: elon@teslamotors.com

The email of the user

user_firstname
string (optional) Example: elon

The firstname of the user

user_lastname
string (optional) Example: musk

The lastname of the user

user_address
string (optional) Example: 1, infinite loop street

First line of the user address

user_address2
string (optional) Example: 2nd floor

Second line of the user address

user_zipcode
string (optional) Example: 75002

User zip code

user_city
string (optional) Example: Paris

User city

user_country
string (optional) 

User country code

Choices: fr

user_phone
string (optional) Example: 0623456789

User phone number

shipping_firstname
string (optional) Example: elon

The firstname of the user for shipping

shipping_lastname
string (optional) Example: musk

The lastname of the user for shipping

shipping_address
string (optional) Example: 1, infinite loop street

First line of the user address for shipping

shipping_address2
string (optional) Example: 2nd floor

Second line of the user address for shipping

shipping_zipcode
string (optional) Example: 75002

User zip code for shipping

shipping_city
string (optional) Example: Paris

User city for shipping

shipping_country
string (optional) 

User country code for shipping

Choices: fr

shipping_phone
string (optional) Example: 0623456789

User phone number for shipping

skip_view_product
number (optional) Example: 1

Set to 1 or 0 to skip the product page or not. 0 by default if omitted.

display_options
string (optional) Example: similar|complementary

Display 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 or 0 to enable the debug mode: unlocks technical custom error messages. 0 by default if omitted.

Response  200
HideShow
Headers
Content-Type: text/html

Cart

Cart
GET/cart/:cart_token

Example URI

GET https://:hostId.tapbuy.io/cart/:cart_token
URI Parameters
HideShow
cart_token
string (required) Example: 123ACB456DEF

The cart token

Response  200
HideShow
Headers
Content-Type: text/html

Your application has been submited. We'll get back to you shortly.
The Tapbuy Team

Login

Best,

The Tapbuy Team

Close