Remove Token

DELETE /payment-methods/token/{id}

Remove a previously tokenized card from the system.

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

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

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

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

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

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

      • The expiration date of the card in MMYY format.

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

    • 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 - No payment terminal available.
      • 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.

    • 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
  • 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
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",
    "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": "id",
      "details": "'Id' must not be empty.",
      "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": []
}