Remove Token

DELETE /payment-methods/token/{id}

Remove a previously tokenized card from the system.

IMPORTANT: Once a payment method token is removed, it cannot be used for any future transactions, including:

  • New sales or authorizations
  • Referenced captures of existing authorizations
  • Referenced refunds of completed transactions
  • Any other transaction operations

Before removing a token, ensure that:

  • All pending authorizations have been captured or voided
  • No future captures or refunds will be needed for transactions using this token
  • All business processes dependent on this token are complete

Post-removal effects:

  • The dateDeleted timestamp will be immediately reflected in all future List Transactions responses for transactions that used this token
  • Sensitive card details (maskedCardNumber, cardExpDate) will be removed for security purposes
  • Historical transaction data (amounts, authorization codes, reference IDs) remains intact for reconciliation
Webhook Events

The following webhook events will be triggered during the tokenized card removal process:

  • token.removed - when a previously tokenized card is removed from the system.

Path parameters

  • id string Required

    The ID of the tokenized card to remove.

Query parameters

  • referenceId string

    A reference ID to tag and track this transaction for reconciliation.

Responses

  • 200 application/json

    A successful card removal response

    Hide response attributes Show response attributes object
    • id string

      Unique ID for this card removal transaction.

    • paymentMethod object

      The tokenized card that was removed.

      Hide paymentMethod attributes Show paymentMethod attributes object
      • id string Required

        The unique identifier of the payment method. This ID has a prefix that makes it human-readable (pmt_trm_* for physical terminals, pmt_vrt_* for virtual terminals, pmt_tkn_* for tokenized cards), but applications should always use the type field to determine the payment method type rather than parsing this ID.

      • dateDeleted string(date-time)

        The date and time (UTC) when this payment method token was removed from the system using the Remove Token endpoint. This parameter will only be returned if the token was removed/deleted from the system.

        This field will be present in three scenarios:

        • As part of a successful Remove Token endpoint response
        • In token.removed webhook notifications
        • In List Transactions responses for transactions where the associated token was later removed

        When this field is present, sensitive card details (maskedCardNumber, cardExpDate) will be removed for security purposes, but all other transaction data remains intact.

      • type string Required

        The type of payment method:

        • Physical - A physical payment terminal for Card Present transactions
        • Virtual - A hosted payment form/iframe for Card Not Present transactions
        • Token - A tokenized card for card-on-file transactions

        Values are Physical, Virtual, or Token.

      • currency string Required

        The currency of the payment method.

        Values are USD or CAD.

      • description string

        A human-readable name for the payment method.

      • cardType string

        The type of card used for this transaction:

        • UNKNOWN - The card type is unknown
        • DEBIT - Debit Card
        • VISA - Visa Credit Card
        • MASTERCARD - MasterCard Credit Card
        • AMEX - American Express Credit Card
        • DINERS - Diners Club Credit Card
        • DISCOVER - Discover Credit Card
        • JCB - JCB Credit Card
        • UNIONPAY - UnionPay Credit Card
        • MAESTRO - Maestro Debit Card
        • GIFT - Gift Card
        • CASH - All-cash Transaction
        • EBT - Electronic Benefits Transfer Card
        • OTHER - Other tender types

        Values are UNKNOWN, DEBIT, VISA, MASTERCARD, AMEX, DINERS, DISCOVER, JCB, UNIONPAY, MAESTRO, GIFT, CASH, EBT, or OTHER.

      • maskedCardNumber string

        The masked card number. The format may vary (e.g. *********0011, 4*0011, etc.)

      • cardExpDate string

        The expiration date of the card in MMYY format.

    • 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.

      Maximum length is 100.

    • 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.

      Values are 0, 1003, 1005, 3000, 3002, 3005, 3006, 3009, 3010, 3011, 3012, 3013, 3014, 3020, 9998, or 9999.

    • resultText string

      A message describing the result code in more detail.

  • 400 application/json

    Request Error

    Hide response attributes Show response attributes object
    • code number

      Numeric error code. These are grouped into ranges for easier identification and troubleshooting.

      • 1000 - AuthenticationGenericError
      • 2000 - RequestValidationGenericError
      • 3000 - UnknownServerGenericError
      • 9000 - UnhandledGenericError

      Values are 1000, 2000, 3000, or 9000.

    • 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

      Values are Completed, Rejected, Interrupted, or 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]

      Represents a validation error that occurred during the request.

      Hide errorDetails attributes Show errorDetails attributes object
      • code number

        Error code

      • field string

        The field with the error

      • message string

        Error message

      • details string

        Additional details about the error

  • 401 application/json

    Unauthorized response due to an invalid or missing API key.

    Hide response attributes Show response attributes object
    • code number

      Numeric error code. These are grouped into ranges for easier identification and troubleshooting.

      • 1000 - AuthenticationGenericError
      • 2000 - RequestValidationGenericError
      • 3000 - UnknownServerGenericError
      • 9000 - UnhandledGenericError

      Values are 1000, 2000, 3000, or 9000.

    • 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

      Values are Completed, Rejected, Interrupted, or 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]

      Represents a validation error that occurred during the request.

      Hide errorDetails attributes Show errorDetails attributes object
      • code number

        Error code

      • field string

        The field with the error

      • message string

        Error message

      • details string

        Additional details about the error

DELETE /payment-methods/token/{id}
curl \
 --request DELETE 'https://api.omni.integratedcommerce.io/v1/payment-methods/token/pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J' \
 --header "x-api-key: $API_KEY"
Response examples (200)
A successful response for a tokenized card removal transaction.
{
  "id": "trx_01J2F0ZJ2JW5B63CJFPXRGAB1S",
  "resultCode": 0,
  "resultText": "Card successfully removed",
  "referenceId": "ref_remove_card_12345",
  "paymentMethod": {
    "id": "pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J",
    "type": "Token",
    "cardType": "VISA",
    "currency": "USD",
    "dateDeleted": "2025-05-11T17:40:33.7688544Z"
  }
}
Response examples (400)
{
  "code": 2000,
  "status": "Rejected",
  "message": "Payment method not found",
  "traceId": "1-6838bcce-5c0074e82ac7170d4f990d87",
  "timestamp": "2025-05-29T20:00:15.5752808Z",
  "errorDetails": [
    {
      "code": 2000,
      "field": "PaymentMethod",
      "message": "Payment method not found"
    }
  ]
}
Response examples (401)
{
  "code": 1000,
  "status": "Rejected",
  "message": "API key cannot be empty",
  "traceId": "1-6838be96-74c62f8e2804352739e63476",
  "timestamp": "2025-05-29T20:07:50.4723483Z",
  "errorDetails": []
}