Tokens

putTokensId

PUT
/tokens/{id}

Update a Token, which is a resource that acts as a storage place for credit card and customer information, allowing you to run Transactions.

Authorization

APIKEY<token>

In: header

Path Parameters

id*string

The ID of this Token.

Header Parameters

token?string

A single-use, limited authentication layer in addition to an API Key or Session Key to authorize sensitive operations. Auth Tokens add security by requiring one-time approval for specific actions.

Request Body

application/json

Update Token Request

Update Token Request

customer?string

The Customer that this Token is associated with.

payment?

The payment method that is associated with this Token.

status?tokenStatus

Indicates if this token is ready for use in transactions and subscriptions or not. A token without complete payment details will be marked as 'pending'.

  • pending - The payment data is not yet available, Token is not ready for use.

  • ready - The payment data is available, Token is ready for use.

Value in

  • "pending"
  • "ready"
token?string

The auto-generated token identifier.

expiration?string

The expiry month for the payment method associated with this Token.In This field is stored as a text string in 'MMYY' format, where 'MM' is the number of a month and 'YY' is the last two digits of a year. For example, '0623' for June 2023. The value must reflect a future date.

name?string

The name of this Token. This field is stored as a text string and must be between 0 and 100 characters long.

description?string

A description of this Token. This field is stored as a text string and must be between 0 and 100 characters long.

custom?string

Custom, free-form field for client-supplied text, must be between 0 and 1000 characters long.

authTokenCustomer?string

The customer reference from the authToken used for user authentication.

origin?integer

The origin of the token.

entryMode?integer

Entry mode set to the token.

accountUpdaterEligible?accountUpdaterEligible

Indicates whether this resource is eligible to be sent for updates to wordpay as part of the account updater process.

  • 1 - Eligible
  • 0 - Not Eligible

Value in

  • 1
  • 0
inactive?inactive

Whether this resource is marked as inactive.

  • 0 - Active
  • 1 - Inactive

Value in

  • 0
  • 1
frozen?frozen

Whether this resource is marked as frozen.

  • 0 - Not Frozen
  • 1 - Frozen

Value in

  • 0
  • 1

Response Body

application/json

application/json

curl -X PUT "https://example.com/tokens/p1_tok_00c82eb304b0067620c82be" \  -H "Content-Type: application/json" \  -d '{    "customer": "t1_cus_00c82eb304b0067620c7",    "status": "pending",    "token": "11c6a6d85f0a20c31e4c49e461066850",    "payment": {      "method": 1,      "number": "378734493671000",      "routing": "code"    },    "expiration": "0123",    "name": "test1",    "description": "test Token",    "custom": "Custom Token Processor 1",    "authTokenCustomer": "authToken",    "origin": 2,    "entryMode": 2,    "accountUpdaterEligible": 1,    "inactive": 0,    "frozen": 0  }'
{  "response": {    "data": [      {        "id": "p1_tok_00c82eb304b0067620c82be",        "created": "2025-03-05 06:00:03.0273",        "modified": "2025-03-05 06:00:03.0273",        "creator": "t1_log_00c82eb304b0067620c8",        "modifier": "t1_log_00c82eb304b0067620c8",        "customer": "t1_cus_00c82eb304b0067620c7",        "payment": "p1_pmt_67c802b1b662567771cf8e0",        "status": "pending",        "token": "11c6a6d85f0a20c31e4c49e461066850",        "omnitoken": "123",        "track": "",        "cvv": "",        "expiration": "0123",        "name": "test",        "description": "test Token",        "custom": "Custom Token Processor 1",        "authTokenCustomer": "",        "accountUpdaterEligible": 1,        "inactive": 0,        "frozen": 0,        "origin": "2",        "entryMode": 2      }    ],    "details": {      "requestId": 1,      "totals": [],      "page": {        "current": 1,        "last": 1,        "hasMore": false      }    },    "errors": []  }}