Create Network Token
POST/network-tokens
This endpoint initiates token provisioning. Please refer to Network Tokens Integration Process.
Request
Header Parameters
Must be application/json
Must be be en-US
The origin of the request
The client making the request
- application/json
Body
required
Possible values: <= 20 characters
, [payment-form
, direct
]
Set payment-form
to leave PAN and other card details collection on SmartPay, see Network Token Web SDK.
Or direct
if PAN is collected by you own (PCI-DSS Level 1 is required). If direct
is provided, then a token will be immediately generated.
Identifier of the customer account in merchant's system, if applicable. Otherwise, random unique value to be provided.
Possible values: <= 30 characters
, [EWalletUser
]
Constant value EWalletUser
.
Possible values: >= 3 characters
and <= 3 characters
Three-characters currency code of the currency that will be used to perform 3DS authentication (only). Does not restrict the currencies of further payments.
billingAddress
object
required
Consumer's billing address data. See Address
in Data model.
Possible values: <= 60 characters
Street name.
Possible values: <= 60 characters
Apartment, suite, unit, building, floor or other secondary address information.
Possible values: <= 60 characters
Specific delivery instructions, department names, or additional floor information.
Possible values: <= 50 characters
The city or localitly of the address.
Possible values: >= 3 characters
and <= 3 characters
ISO-3 code of the address country (e.g., DEU for Germany).
Possible values: <= 10 characters
The house or building number corresponding to the street address.
Possible values: <= 10 characters
The postal or ZIP code of the address.
Possible values: <= 3 characters
3-letter code of the address state. Mandatory when countryCode
corresponds to Canada or USA.
shippingAddress
object
Consumer's shipping address data. See Address
in Data model.
Possible values: <= 60 characters
Street name.
Possible values: <= 60 characters
Apartment, suite, unit, building, floor or other secondary address information.
Possible values: <= 60 characters
Specific delivery instructions, department names, or additional floor information.
Possible values: <= 50 characters
The city or localitly of the address.
Possible values: >= 3 characters
and <= 3 characters
ISO-3 code of the address country (e.g., DEU for Germany).
Possible values: <= 10 characters
The house or building number corresponding to the street address.
Possible values: <= 10 characters
The postal or ZIP code of the address.
Possible values: <= 3 characters
3-letter code of the address state. Mandatory when countryCode
corresponds to Canada or USA.
consumer
object
required
Consumer's personal data, in case the consumer
is a physical person.
Mandatory, unless businessConsumer
is provided.
consumer
and businessConsumer
objects may not be submitted together.
Possible values: <= 5 characters
Consists of ISO 639-1 language code and ISO 3166-1 alpha-2 country code separated by dash. If this value is not provided the browser culture is used. Default culture is English (e.g., en-de). This field is not case sensitive.
Possible values: <= 10 characters
, Value must match regular expression ^\d{4}-\d{2}-\d{2}$
Date of birth. Format - YYYY-MM-DD. Mandatory for payment option registration flow. Minimum date allowed is 1900-01-01
Possible values: <= 255 characters
Customer email address for any notification
Possible values: <= 60 characters
Person first name
Possible values: <= 6 characters
Person gender
Possible values: <= 30 characters
Person's home phone number (including the country code)
Possible values: <= 60 characters
Person last name
Possible values: <= 255 characters
Consumer/Customer Account Id in the merchant system. When provided into the Create Checkout API, SmartPay will request e-wallet account creation which will have external account reference equals to the given merchantCustomerId
value.
Possible values: <= 60 characters
The customer's middle name
Possible values: <= 30 characters
Person's mobile phone number (including the country code)
Possible values: <= 30 characters
Person's tax identification number
Possible values: <= 3 characters
Person title
Possible values: <= 30 characters
Person's work phone number (including the country code)
cardDetails
object
Card details required only if integrationFlow
is set to direct
.
Possible values: <= 10 characters
Brand of the card used.
Possible values: <= 64 characters
Name of the cardholder.
Possible values: <= 32 characters
Permanent token for the PAN.
Possible values: <= 18 characters
Permanent token for the CVV.
Possible values: <= 2 characters
Expiry month of the card.
Possible values: <= 4 characters
Expiry year of the card.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful response with token details.
The Create Token response includes the 36-character GUID tokenId
.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Possible values: <= 36 characters
The generated token ID.
Possible values: <= 30 characters
Timestamp of token creation.
Possible values: <= 30 characters
Timestamp of last update.
Possible values: <= 36 characters
Authorization ID for the transaction.
Possible values: <= 36 characters
External merchant ID.
Possible values: <= 32 characters
Current status of the token.
{
"tokenId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"authorizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalMerchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string"
}
{
"tokenId": "fb80458c-82ad-4abb-9e96-fc7d0a8b3d59",
"createdAt": "2023-03-21T13:57:03.138Z",
"updatedAt": "2023-03-21T13:57:03.138Z",
"authorizationId": "b50938f6-3f6b-4716-a173-6fe726a1db31",
"externalMerchantId": "9ff980b6-1fc6-4b61-9957-f8655b04cd9d",
"status": "PENDING_PAYMENT_FORM"
}
Bad Request response with error messages.
If you receive an HTTP status other than 2xx
, the request failed. Please try to interpret the response message to correct your request and contact Customer Support in case of further questions.
- application/json
- Schema
- Example (from schema)
- Example
Schema
List of error messages.
{
"message": [
"string"
]
}
{
"message": [
"accountReferenceId must be a string",
"accountReferenceId should not be empty",
{
"accountCategory must be one of the following values": "EWalletUser, Guest"
},
"accountCategory should not be empty"
]
}
Unauthenticated
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You are not authenticated to perform this request.",
"code": "unauthorized"
}
]
}
Forbidden
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You do not have permissions to perform this request.",
"code": "forbidden"
}
]
}
Not Found
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Resource not found.",
"code": "not_found"
}
]
}
Internal Server Error
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- MOD1
- MOD2
Array [
]
errorDetails
object
message
object
oneOf
string
string
{
"error": "string",
"errorDetails": {
"context": {},
"gatewayDescription": "string",
"paymentProviderDescription": "string"
},
"message": "string"
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Internal server error."
}
]
}