Skip to main content
POST
/
api
/
v2
/
tokens
Create Token
curl --request POST \
  --url https://gateway.paybyrd.com/api/v2/tokens \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "Type": "Card",
  "CustomReference": "Wallet123",
  "Alias": "MyShoppingCard",
  "RedirectUrl": "http://client.co/3ds/validation?token=123456",
  "Card": {
    "number": "5149682323738886",
    "expiration": "03/29",
    "cvv": "929",
    "holder": "Peter Parker",
    "aav": "<string>",
    "dsTransactionId": "<string>",
    "eci": "<string>",
    "xid": "<string>"
  }
}
'
{
  "card": {
    "number": "514968******8886",
    "expiration": "03/29",
    "cvv": "***",
    "holder": "Peter Parker",
    "aav": "<string>",
    "dsTransactionId": "<string>",
    "eci": "<string>",
    "xid": "<string>",
    "countryCode": "PRT"
  },
  "tokenId": "5d3491c3-8978-4ff5-8d74-31b0b0499b01",
  "customReference": "Wallet123",
  "alias": "PersonalCard",
  "action": {
    "type": "redirect",
    "url": "https://gateway.paybyrd.com/v1/ThreeDSecure/InitiatePayment?transactionId=0411c4cf-3d6c-4315-ac5e-98fb1d72f11f"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
Type
string
required

Identity the type of the token (currently only "card")

Example:

"Card"

CustomReference
string
required

Identify the token by an aggregation reference of your business (CustomerId, WalletId, StoreId ...)

Example:

"Wallet123"

Alias
string
required

Alias for the new token (usually provided by the customer)

Example:

"MyShoppingCard"

RedirectUrl
string
required

The url that redirect the user at the end of 3ds validation (in fail, succes and reject cases)

Example:

"http://client.co/3ds/validation?token=123456"

Card
object
required
TransactionMode
enum<string>

"transactionMode" is used for tokenization and tokenized payments. The value "initialUnescheduled" tokenizes details for future one-time, unscheduled payments. The value "initialRecurring' tokenizes details for the first in a series of scheduled payments. The value "cardHolderInitiatedUnescheduled" is for subsequent unscheduled payment initiated by the cardholder. The value "merchantInitiatedUnescheduled" is for unscheduled payment initiated by the merchant. The value "merchantInitiatedRecurring" is for subsequent scheduled payment initiated by the merchant.

Available options:
initialUnescheduled,
initialRecurring,
cardHolderInitiatedUnescheduled,
merchantInitiatedUnescheduled,
merchantInitiatedRecurring

Response

201 - application/json

201

card
object
tokenId
string

The id of generated token

Example:

"5d3491c3-8978-4ff5-8d74-31b0b0499b01"

customReference
string

The customReference sent in the CardTokenizeRequest

Example:

"Wallet123"

alias
string

The Alias sent in the CardTokenizeRequest

Example:

"PersonalCard"

action
object