Update Token
Update the expiration date for a previously tokenized card.
Webhook Events
The following webhook events will be triggered during the tokenized card update process:
token.updated
- when an expiration date for a previously tokenized card is updated.
Path parameters
-
id
string Required The ID of the tokenized card to update.
Body
Required
The request to update a previously tokenized card.
-
referenceId
string An optional custom reference ID to tag and track this token operation. If provided, this value must be unique per merchant. If not provided, a unique reference ID will be generated automatically by the system.
Maximum length is
100
. -
cardExpDate
string Required The new expiration date of the card in MMYY format.
PUT
/payment-methods/token/{id}
curl \
--request PUT 'https://api.omni.integratedcommerce.io/v1/payment-methods/token/pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J' \
--header "x-api-key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"cardExpDate":"1225","referenceId":"ref_update_card_12345"}'
Request example
{
"cardExpDate": "1225",
"referenceId": "ref_update_card_12345"
}
Response examples (200)
A successful response for a tokenized card update transaction.
{
"id": "trx_01J2F0ZJ2JW5B63CJFPXRGAB1S",
"resultCode": 0,
"resultText": "Card successfully updated",
"referenceId": "ref_update_card_12345",
"paymentMethod": {
"id": "pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J",
"type": "Token",
"cardType": "VISA",
"currency": "USD",
"cardExpDate": "1225",
"description": "Token for John Doe's Visa",
"maskedCardNumber": "************0011"
}
}
Response examples (400)
{
"code": 2000,
"status": "Rejected",
"message": "One or more validation errors occurred.",
"traceId": "1-6838bcce-5c0074e82ac7170d4f990d87",
"timestamp": "2025-05-29T20:00:15.5752808Z",
"errorDetails": [
{
"code": 2000,
"field": "cardExpDate",
"details": "The length of 'CardExpDate' must be 4 characters or fewer.",
"message": "Request validation failed"
}
]
}
Response examples (401)
{
"code": 1000,
"status": "Rejected",
"message": "Invalid or missing API key",
"traceId": "1-6838be96-74c62f8e2804352739e63476",
"timestamp": "2025-05-29T20:07:50.4723483Z",
"errorDetails": []
}