Sale (Token)
Process a financial transaction using a previously tokenized card.
Webhook Events
The following webhook events will be triggered during the transaction process:
sale.completed
- when a financial transaction is processed and completed.
Body
Required
The request to process a Card On File transaction using a tokenized card.
-
amount
number(uint32) Required The total transaction amount. This is the full amount that will be processed in the transaction. Transaction amounts are positive integers representing the amount in its smallest denomination of the configured currency (e.g. cents for USD or CAD).
Minimum value is
1
, maximum value is999999999
. -
amountBreakdown
object Optional fields to specify the portion of the total transaction amount that represents goods/services, tax, cashback and/or tip. These values are for reporting purposes only and will not be added to the Amount field. These amount are represented as a positive integer in the smallest denomination of the configured currency (e.g. cents for USD or CAD).
-
paymentMethodId
string Required The ID of the tokenized card that will be used for this Card On File transaction.
- Example format:
pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J
- ALWAYS REQUIRED when using a tokenized card
- Example format:
-
invoiceNumber
string An optional alphanumeric invoice number for this transaction. If provided, the same value will be populated in the response.
Maximum length is
100
. -
orderNumber
string An optional alphanumeric order number for this transaction. If provided, the same value will be populated in the response.
Maximum length is
100
. -
referenceId
string An optional custom reference ID for this transaction. Include this if you want to use your own reference system for linking transactions together (for example, when processing captures and refunds). If provided, this value must be unique per merchant. The reference ID can be used for processing captures and referenced refunds by including it in the originalReferenceId field of subsequent transactions. If not provided, a unique reference ID will be generated automatically by the system.
Maximum length is
100
.
curl \
--request POST 'https://api.omni.integratedcommerce.io/v1/transactions/token-sale' \
--header "x-api-key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"amount":1000,"orderNumber":"order_number_1234","referenceId":"ref_s192i49i","invoiceNumber":"inv_12345678","amountBreakdown":{"tax":100,"tip":0,"cashback":0,"amountGoodsAndServices":900},"paymentMethodId":"pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J"}'
{
"amount": 1000,
"orderNumber": "order_number_1234",
"referenceId": "ref_s192i49i",
"invoiceNumber": "inv_12345678",
"amountBreakdown": {
"tax": 100,
"tip": 0,
"cashback": 0,
"amountGoodsAndServices": 900
},
"paymentMethodId": "pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J"
}
{
"id": "trx_01J2F0EKHC7HY2R93C8ENBD1FG",
"type": "Sale",
"timestamp": "2025-05-27T18:49:31Z",
"resultCode": 0,
"resultText": "Successful transaction request",
"orderNumber": "order_number_1234",
"referenceId": "ref_s192i49i",
"balanceAmount": 0,
"invoiceNumber": "inv_12345678",
"paymentMethod": {
"id": "pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J",
"type": "Token",
"cardType": "VISA",
"currency": "USD",
"cardExpDate": "1225",
"description": "Token for John Doe's Visa",
"maskedCardNumber": "************0011"
},
"approvedAmount": 1000,
"requestedAmount": 1000,
"transactionResponses": [
{
"authCode": "000AAA",
"cardType": "VISA",
"avsResult": "A",
"cvvResult": "M",
"accountType": "Credit",
"responseCode": 1,
"paymentMethod": {
"id": "pmt_tkn_01JRZPRGFF4J2SZC3HMDBYEN2J",
"type": "Token",
"cardType": "VISA",
"currency": "USD",
"cardExpDate": "1225",
"description": "Token for John Doe's Visa",
"maskedCardNumber": "************0011"
},
"amountApproved": 1000,
"hostResponseText": "APPROVED 00",
"approvedAmountBreakdown": {
"tax": 100,
"tip": 0,
"cashback": 0,
"amountGoodsAndServices": 900
}
}
]
}
{
"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": "Amount",
"details": "The Amount field must be a positive number between 1 and 999999999.",
"message": "Request validation failed"
}
]
}
{
"code": 1000,
"status": "Rejected",
"message": "Invalid or missing API key",
"traceId": "1-6838be96-74c62f8e2804352739e63476",
"timestamp": "2025-05-29T20:07:50.4723483Z",
"errorDetails": []
}