Create Token (Card Present)
Tokenize a card using a physical terminal. A $0 authorization will occur to validate the card. If valid, the card and expiration date will be tokenized and stored and a paymentMethodId will be returned for future Card On File transactions.
Webhook Events
The following webhook events will be triggered during the tokenization process:
auth.completed
- when the $0 authorization is processed and completed.token.created
- when a card is tokenized and stored as a payment method.
Body
Required
The request to tokenize a card using a physical terminal.
-
paymentMethodId
string The ID of the payment method (physical terminal) to use for adding a card.
- Example format:
pmt_trm_01JRZPTMTBN41PC3VPQNZ5T3HF
- OPTIONAL ONLY if you have a single terminal configured
- REQUIRED if you have multiple physical terminals configured
You can retrieve all available physical payment terminal IDs for your account using the
GET /payment-methods
endpoint. - Example format:
-
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
.
curl \
--request POST 'https://api.omni.integratedcommerce.io/v1/payment-methods/physical' \
--header "x-api-key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"referenceId":"ref_add_card_12345","paymentMethodId":"pmt_trm_01JRZPTMTBN41PC3VPQNZ5T3HF"}'
{
"referenceId": "ref_add_card_12345",
"paymentMethodId": "pmt_trm_01JRZPTMTBN41PC3VPQNZ5T3HF"
}
{
"id": "trx_01J2F0ZJ2JW5B63CJFPXRGAB1S",
"resultCode": 0,
"resultText": "Card successfully tokenized",
"referenceId": "ref_add_card_12345",
"paymentMethod": {
"id": "pmt_trm_01JRZPTMTBN41PC3VPQNZ5T3HF",
"type": "Physical",
"currency": "USD",
"description": "Main Store Terminal"
},
"transactionResponses": [
{
"authCode": "000AAA",
"cardType": "VISA",
"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"
},
"hostResponseText": "APPROVED 00"
}
]
}
{
"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": "paymentMethodId",
"details": "'PaymentMethodId' must not be empty.",
"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": []
}