Create Embedded Checkout Token

When using Embedded Checkout, you will need to obtain a unique Embedded Checkout token for each session, and then use that in your checkout form. BlueSnap will save the shopper's payment information and associate it with the token, and you can include the token in your API requests in order to process card transactions or create or update vaulted shoppers.

For detailed instructions, see Implementing Embedded Checkout.

📘

Token expiration

The Embedded Checkout Token will expire after 60 minutes.

Request Content

To create an Embedded Checkout token, simply send a POST request to:
Sandbox: https://sandbox.bluesnap.com/services/2/payment-fields-tokens
Production: https://ws.bluesnap.com/services/2/payment-fields-tokens

Response Details

The response will provide the token in the location header, as follows:
location: BLUESNAPDOMAINPATH/services/2/payment-fields-tokens/HOSTEDFIELDTOKENID


Examples

Request Example

curl -v -X POST https://sandbox.bluesnap.com/services/2/payment-fields-tokens \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Example

HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/payment-fields-tokens/12345abcde*********