Skip to content


Use Tokens to manually create or update a token that contains card information. The token name must be unique and is by default generated automatically. You can also manually set a token name in the body parameters.


POST /api/v2/merchants/{mid}/tokens

Creates a new token or updates an existing token.

Request parameters

Path parameter Requirement Description Type
mid Required The merchant account reference number. Number
Body parameter Requirement Description Type
orderId Required The reference to uniquely identify a payment. String
token Optional The token value or name. String
cardNumber Required The shopper’s card account number. String
expirationDate Required The shopper’s card expiry month and year in the format MM-YYYY. String
Issue Optional The card issue number. Only available for some domestic cards. Number
startDate Optional The card validity start date. Only available for some domestic cards. String
originatingAccountType Optional The card account type, required by some banks to correctly handle a transaction. String
authorizationType Optional The card authorization type, required by some card associations. String
cardHolderName Required The card holder’s name as it is printed on the card. String

Sample request

curl -X POST \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172' \
    https://    /api/v2/merchants/1570616552/tokens

Request body example

    "orderId": "order_example_1",
    "cardInfo": {
      "cardNumber": "4111111111111111",
      "expirationDate": "12-2024",
      "cardHolderName": "Firstname Lastname"

Sample response

    "transactionReferences": [
            "transactionId": 10044016524,
            "transactionTypeId": 130,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "StoreToken",
            "transactionDate": "2020-03-12T08:38:50.348Z",
            "transactionDesc": "Transaction Accepted",
            "statusCode": 0,
            "status": "Processed",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "token": "9000033649121111",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "12-2024"
Back to top