Secure Payment Parameters
Create Token API
Request
The following are parameters that can be included in a Create Token API request:
Parameter | Type | Required | Description |
|---|---|---|---|
| boolean | Optional | Pass |
| string | Required if not configured in your Payment Page Display settings. Otherwise, optional. | URL where BlueSnap directs the shopper if the transaction is cancelled. |
| boolean | Optional | Default is |
| string | Optional | Currency code (ISO 4217) of the amount to be charged. |
| string | Optional | Pass |
| integer | Optional | Specifies the number of hours a JSON web token (JWT) expires after it is created. Accepts up to |
| array of objects | Required for a regular transaction. | (Not relevant for a subscription.)
|
| string | Optional | Merchant's unique ID for a new transaction. 1–50 characters. Special characters are not recommended. Not relevant for a subscription. |
| string | Required | Use the value ‘one_time’ for a regular transaction, or the value ‘subscription’ for a subscription. |
| boolean | Optional | Default is |
| array of objects | Required for a subscription. | (Not relevant for a regular transaction.)
|
| string | Optional | ID of the shopper. This can be used to associate saved details with a shopper, allowing them to use those details for the current transaction. Refer toReturning Shoppers. |
| string | Required if not configured in your Payment Page Display settings . Otherwise, optional. | URL where BlueSnap will direct the shopper if the transaction is successful. For example, this might be a confirmation page. |
Response
A successful response contains the following properties:
Property Name | Type | Description |
|---|---|---|
| string | The JSON Web Token, used to initialize the Hosted Payment Page. |
| string | Was
|
sdkRequest object
sdkRequest is passed to bluesnap.redirectToPaymentPage in Step 3 of the implementation process. This object contains the following properties.
| Property | Type | Description |
|---|---|---|
displayData | object | (Optional) Contains your Hosted Payment Page settings. Supports these properties. |
jwt | string | (Required) Your token from Step 2. |
sdkRequest.displayData property
The displayData property of your sdkRequest object supports these properties. All properties are Optional.
Property | Type | Description |
|---|---|---|
| array of objects | Each object in the array contains data to pre-populate the checkout page custom fields. If you wish to configure custom fields, refer to Configuring Page Display.
|
| array of objects | Each object in the array contains a key and value pair, which will be attached to the transaction as part of the metaData array.
|
| array of strings | The card brands to disable for this transaction. Default is that all the supported card brands for your configuration will be available.
|
| boolean | Default is false. This should only be set to true if the merchant wishes to disable country selection and they have provided a valid shopper country. |
| array of strings | The payment methods to disable for this transaction. Default is that all your supported payment methods will be available.
|
| object | Settings that only apply if the Hosted Payment Page is in an iframe.
Note: ApplePay and PayPal are not supported in iframe mode. |
| string | Language code (ISO 639-1).
|
| object | Details about the shopper to pre-populate the checkout page. Supports these properties. |
| string | Description of the transaction, which appears on the shopper's credit card statement. Maximum 20 characters. |
sdkRequest.displayData.shopperInfo object
Supports the following properties. All properties are Optional, type: string.
Property | Description |
|---|---|
| The shopper’s first address line. Only if full billing is required. |
| The shopper’s second address line. Only if full billing is required. |
| The shopper’s city. Only if full billing is required. |
| The two-letter code of the shopper's country. |
| The shopper’s email address. Only if email is required. |
| The shopper's name. |
| The shopper's postal code. |
| The two-letter code of the shopper's state. Currently supported only for the United States, Brazil, and Canada. For states in other countries, include the state within the address1 property. |
Updated 6 days ago
