Network Tokens

Provision a Network Token

Beta

Provisions a network token synchronously. If the merchant stores their cards with Checkout.com, then source ID can be used to request a network token for the given card. If the merchant does not store their cards with Checkout.com, then card details have to be provided.

Body·
application/json
  • source
    required

    The source object

    An existing payment source

    • type
      Discriminator
      Type: string
      required

      The source type

    • id
      Type: string Pattern: ^(src)_(\w{26})$
      required

      The card instrument

Responses
  • application/json
  • application/json
  • 401

    Unauthorized

  • 403

    Forbidden

  • 415

    Unsupported Media Type

  • application/json
  • 500

    Internal Server Error

  • 502

    Bad Gateway

  • 504

    Gateway Timeout

Request Example for post/network-tokens
curl 'https://{prefix}.api.sandbox.checkout.com/network-tokens' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "source": {
    "type": "id",
    "id": "src_wmlfc3zyhqzehihu7giusaaawu"
  }
}'
{
  "card": {
    "last4": "6378",
    "expiry_month": "5",
    "expiry_year": "2025"
  },
  "network_token": {
    "id": "nt_xgu3isllqfyu7ktpk5z2yxbwna",
    "state": "active",
    "number": "5436424242424242",
    "expiry_month": "5",
    "expiry_year": "2025",
    "type": "vts",
    "payment_account_reference": "5001a9f027e5629d11e3949a0800a",
    "created_on": "2020-02-11T15:57:32.435+00:00",
    "modified_on": "2020-02-11T15:57:32.435+00:00"
  },
  "token_requestor_id": "1234567890",
  "token_scheme_id": "scheme_visa_001",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna"
    },
    "cryptogram": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms"
    },
    "card-art": {
      "href": "https://card-art.checkout.com/00340aa7bd3de35cb1048369450d8df4"
    }
  }
}

Get Network Token

Beta

Given network token ID, this endpoint returns network token details: DPAN, expiry date, state, TRID and also card details like last four and expiry date.

Path Parameters
  • network_token_id
    Type: string
    required

    Unique token ID assigned by Checkout.com for each token

Responses
  • application/json
  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Network Token not found

  • 500

    Internal Server Error

  • 502

    Bad Gateway

  • 504

    Gateway Timeout

Request Example for get/network-tokens/{network_token_id}
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "card": {
    "last4": "6378",
    "expiry_month": "5",
    "expiry_year": "2025"
  },
  "network_token": {
    "id": "nt_xgu3isllqfyu7ktpk5z2yxbwna",
    "state": "active",
    "number": "5436424242424242",
    "expiry_month": "5",
    "expiry_year": "2025",
    "type": "vts",
    "payment_account_reference": "5001a9f027e5629d11e3949a0800a",
    "created_on": "2020-02-11T15:57:32.435+00:00",
    "modified_on": "2020-02-11T15:57:32.435+00:00"
  },
  "token_requestor_id": "1234567890",
  "token_scheme_id": "scheme_visa_001",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna"
    },
    "cryptogram": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms"
    },
    "card-art": {
      "href": "https://card-art.checkout.com/00340aa7bd3de35cb1048369450d8df4"
    }
  }
}

Request a cryptogram

Beta

Using network token ID as an input, this endpoint returns token cryptogram.

Path Parameters
  • network_token_id
    Type: string
    required

    Unique token ID assigned by Checkout.com for each token

Body·
application/json
  • transaction_type
    Type: string enum
    required

    Transaction type the cryptogram is requested for.

    values
    • ecom
    • recurring
    • pos
    • aft
Responses
  • application/json
  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Network Token not found

  • application/json
  • 500

    Internal Server Error

  • 502

    Bad Gateway

  • 504

    Gateway Timeout

Request Example for post/network-tokens/{network_token_id}/cryptograms
curl 'https://{prefix}.api.sandbox.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "transaction_type": "ecom"
}'
{
  "cryptogram": "AhJ3hnYAoAbVz5zg1e17MAACAAA=",
  "eci": "7",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms"
    },
    "network-token": {
      "href": "https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna"
    }
  }
}

Permanently deletes a network token

Beta

This endpoint is for permanently deleting a network token. A network token should be deleted when a payment instrument it is associated with is removed from file or if the security of the token has been compromised.

Path Parameters
  • network_token_id
    Type: string
    required

    Unique token ID assigned by Checkout.com for each token

Body·
application/json
  • initiated_by
    Type: string enum
    required

    Who initiated/requested the deletion of the token.

    values
    • cardholder
    • token_requestor
  • reason
    Type: string enum
    required

    The reason for deleting the token.

    values
    • fraud
    • other
Responses
  • 204

    Ok

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Network token not found

  • application/json
  • 500

    Internal Server Error

  • 502

    Bad Gateway. Error from scheme

  • 504

    Timeout while waiting for a scheme response

Request Example for patch/network-tokens/{network_token_id}/delete
curl 'https://{prefix}.api.sandbox.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/delete' \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "initiated_by": "token_requestor",
  "reason": "other"
}'
No Body