BlueSnap Checkout 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 |
---|---|---|---|
cancelUrl | string | Required | URL where BlueSnap will direct the shopper if the transaction is cancelled. |
challengeRequested3ds | boolean | Optional | Default is false . This should only be set to true if the merchant wishes to mandate shopper identity verification as part of the 3-D Secure authentication process. See 3-D Secure Guide. |
currency | string | Optional | Currency code (ISO 4217) of the amount to be charged. Required for a regular transaction. Not relevant for a subscription. |
lineitems | array of objects | Optional Required for a regular transaction. | Each object in the array contains the line-item details of the transaction, such as the goods/services purchased or shipping. At least one line-item object must be included in the request. Each object contains the following properties: id string Required amount decimal Required quantity integer Optional label string Required description string Optional imgUrl string Optional Note: imgUrl is the relative URL of your saved image. For example: /developers/571747/download.jpg . Make sure to choose a saved image from the BlueSnap environment you're working in.Not relevant for a subscription. |
merchantTransactionId | string | Optional | Merchant's unique ID for a new transaction. 1–50 characters. Special characters are not recommended. Not relevant for a subscription. |
mode | string | Required | Use the value ‘one_time’ for a regular transaction, or the value ‘subscription’ for a subscription. |
onBehalf | boolean | Optional | Default is false . This should only be set to true if the transaction is completed on behalf of the shopper and not by the shopper themselves. |
planItems | array of objects | Optional Required for a subscription. | Not relevant for a regular transaction. The array contains exactly one plan-item object.The plan-item object contains the following properties: id string Required recurringChargeAmount decimal Optional trialPeriodDays integer Optional initialChargeAmount decimal Optional quantity integer Optional label string Optional description string Optional imgUrl string Optional Note: - imgUrl is the relative URL of your saved image. For example: /developers/571747/download.jpg. Make sure to choose a saved image from the BlueSnap environment you're working in. |
shopperId | 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. See Returning Shoppers. |
successUrl | string | Required | 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 |
---|---|---|
jwt | string | The JSON Web Token, used to initialize the Hosted Payment Page. |
merchantTransactionId | string | If merchantTransactionId was provided in the request, the same value will appear here.If merchantTransactionId was not provided in the request, a value will be generated by BlueSnap to identify jwt . |
sdkRequest object
sdkRequest
is passed to bluesnap.redirectToPaymentPage
in Step 3 of the implementation process. This object contains the following properties.
Property | Type | Required | 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.
Property | Type | Required | Description |
---|---|---|---|
customFields | array of objects | Optional | Each object in the array contains data to pre-populate the checkout page custom fields. Each object contains the following properties: id string Required value string | boolean Required |
disabledCardBrands | array of strings | Optional | The card brands to disable for this transaction. Default is that all the supported card brands for your configuration will be available. Supported values: - AMEX - ARGENCARD - CABAL - CARTE_BLEUE - CENCOSUD - CHINA_UNION_PAY - DINERS - DISCOVER - ELO - HIPERCARD - JCB - MASTERCARD - NARANJA - TARJETASHOPPING - VISA |
disableCountrySelection | boolean | Optional | 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. |
disabledPaymentMethods | array of strings | Optional | The payment methods to disable for this transaction. Default is that all your supported payment methods will be available. Supported values: - ACSS_DIRECT_DEBIT - APPLE_PAY - BECS_DIRECT_DEBIT - CC - ECP - GOOGLE_PAY_TOKENIZED_CARD - IDEAL - PAYPAL - SOFORTUBERWEISUNG |
iframeOptions | object | Optional | Settings that only apply if the Hosted Payment Page is in an iframe. Includes one optional parameter: topRedirect Boolean Default: false .If the Hosted Payment Page is open inside of an iframe and this parameter is provided and is true , redirecting to the success/cancel URLs will redirect the parent page and not just the iframe.Note: ApplePay and PayPal are not supported in iframe mode. |
language | string | Optional | Language code (ISO 639-1). Default: English. Supported values: - en (English) - de (German) - nl (Dutch) |
shopperInfo | object | Optional | Details about the shopper to pre-populate the checkout page. Supports these properties. |
softDescriptor | string | Optional | Description of the transaction, which appears on the shopper's credit card statement. Maximum 20 characters. |
sdkRequest.displayData.shopperInfo object
Supports the following properties.
Property | Type | Required | Description |
---|---|---|---|
address1 | string | Optional | The shopper’s first address line. Only if full billing is required. |
address2 | string | Optional | The shopper’s second address line. Only if full billing is required. |
city | string | Optional | The shopper’s city. Only if full billing is required. |
country | string | Optional | The two-letter code of the shopper's country. |
email | string | Optional | The shopper’s email address. Only if email is required. |
name | string | Optional | The shopper's name. |
postalCode | string | Optional | The shopper's postal code. |
state | string | Optional | 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. Only if full billing is required. |
Updated 3 months ago