# Update Token **PUT /payment-methods/token/{id}** 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. ## Servers - https://api.omni.integratedcommerce.io/v1: https://api.omni.integratedcommerce.io/v1 () ## Authentication methods - Api key header ## Parameters ### Path parameters - **id** (string) The ID of the tokenized card to update. ### Body: application/json (object) 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. - **cardExpDate** (string) The new expiration date of the card in MMYY format. ## Responses ### 200 A successful card update response #### Body: application/json (object) - **id** (string) Unique ID for this card update transaction. - **paymentMethod** (object) - **referenceId** (string) The reference ID for this transaction. This will either be the reference ID provided in the transaction request or, if no value was provided, a value generated automatically by the system. This reference ID can be used for processing captures and referenced refunds by including it in the originalReferenceId field of subsequent transactions. - **resultCode** (number) Result codes: * `0` - Successful transaction request. (Check each transactionResponse's responseCode to determine if a transaction was approved or declined, card was tokenized, etc.) * `1003` - The payment terminal is busy or unavailable. (If this error persists, the user may need to close and re-open the Payment Application on the terminal or restart the terminal) * `1005` - The specified terminal could not be found. * `3000` - An unexpected error occurred. Please try again. * `3002` - The transaction could not be completed because the payment terminal could not find the related transaction. * `3005` - To resolve this error, power off your payment terminal, wait one minute and retry the transaction. If the error persists, please contact support. * `3006` - The transaction could not be completed because the payment terminal is low on battery. * `3009` - The transaction could not be completed because of network connectivity issues with the payment terminal. Please restore connectivity and try again. * `3010` - The transaction took too long and was cancelled by the application. * `3011` - Invalid transaction request. Please consult the documentation for valid transaction requests. * `3012` - Invalid transaction request. paymentMethodId is invalid. * `3013` - Invalid transaction request. The specified amount appears to be incorrect. Please retry with a smaller amount. * `3014` - Invalid amount. Please try your transaction again with an amount greater than $0. * `3020` - An unsupported transaction result was received. * `9998` - The system is not ready to process a transaction. * `9999` - An unknown error has occurred. If available, an auxiliary error code will be provided in the message. - **resultText** (string) A message describing the result code in more detail. ### 400 Request Error #### Body: application/json (object) - **code** (number) Numeric error code. These are grouped into ranges for easier identification and troubleshooting. * `1000` - AuthenticationGenericError * `2000` - RequestValidationGenericError * `3000` - UnknownServerGenericError * `9000` - UnhandledGenericError - **status** (string) Execution status of the request sent to the payment gateway. * Completed - The request completed successfully. * Rejected - The request was rejected by the payment gateway. No action or side effects occurred. The transaction can safely be retried. * Interrupted - The request was interrupted, and the final status is unknown. Possible side effects may have occurred (e.g., a Sale (Token) that returns Interrupted might still charge the customer, even if an error is returned). Additional checks are required before retrying the transaction. * Unknown - **message** (string) Developer-facing error message. - **traceId** (string) Unique trace identifier for tracking and debugging this request. - **timestamp** (string(date-time)) The timestamp when the error occurred (UTC). - **errorDetails** (array[object]) ### 401 Unauthorized response due to an invalid or missing API key. #### Body: application/json (object) - **code** (number) Numeric error code. These are grouped into ranges for easier identification and troubleshooting. * `1000` - AuthenticationGenericError * `2000` - RequestValidationGenericError * `3000` - UnknownServerGenericError * `9000` - UnhandledGenericError - **status** (string) Execution status of the request sent to the payment gateway. * Completed - The request completed successfully. * Rejected - The request was rejected by the payment gateway. No action or side effects occurred. The transaction can safely be retried. * Interrupted - The request was interrupted, and the final status is unknown. Possible side effects may have occurred (e.g., a Sale (Token) that returns Interrupted might still charge the customer, even if an error is returned). Additional checks are required before retrying the transaction. * Unknown - **message** (string) Developer-facing error message. - **traceId** (string) Unique trace identifier for tracking and debugging this request. - **timestamp** (string(date-time)) The timestamp when the error occurred (UTC). - **errorDetails** (array[object]) [Powered by Bump.sh](https://bump.sh)