Refund
Process a referenced refund or void for a previously completed sale or capture transaction. If the transaction is in the current batch, the system will attempt to void it, otherwise it will be refunded resulting in a financial transaction.
Webhook Events
The following webhook events will be triggered during the refund process:
refund.completed
- when a transaction void or refund for a previously completed transaction is completed.
POST
/transactions/refund
curl \
--request POST 'https://api.omni.integratedcommerce.io/v1/transactions/refund' \
--header "x-api-key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"amount":1000,"orderNumber":"order_number_1234","referenceId":"ref_refund_12345","invoiceNumber":"inv_1234567890123456789012354678901","originalTransactionId":"trx_01J2F0EKHC7HY2R93C8ENBD1FG"}'
Request examples
Refund using original transaction ID
{
"amount": 1000,
"orderNumber": "order_number_1234",
"referenceId": "ref_refund_12345",
"invoiceNumber": "inv_1234567890123456789012354678901",
"originalTransactionId": "trx_01J2F0EKHC7HY2R93C8ENBD1FG"
}
{
"amount": 1000,
"orderNumber": "order_number_1234",
"referenceId": "ref_refund_12345",
"invoiceNumber": "inv_1234567890123456789012354678901",
"originalReferenceId": "ref_s192i49i"
}
Response examples (200)
A successful response for a refund transaction.
{
"id": "trx_01J2F0ZJ2JW5B63CJFPXRGAB1S",
"type": "Refund",
"status": "Completed",
"receipt": {
"lines": [
" Test Merchant ",
" 300 S Wacker ",
" Loop, ",
" ",
" ",
"TERM # 11000367",
"RECORD # 0656191",
"HOST INVOICE # 000038",
"HOST SEQ # 1720656191",
"MERCH ",
"INVOICE inv_123456789012",
" 3456789012354678",
" 901 ",
"------------------------",
"CARD ************0011",
"VISA Contact",
"07/10/2024 20:03:05",
"------------------------",
" VOID SALE ",
" ",
"TOTAL USD $10.00",
"------------------------",
"AUTH#:000AAA B:171",
" ",
" APPROVED 00 ",
" THANK YOU ",
" ",
" Visa Credit ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" MERCHANT COPY ",
" Test Merchant ",
" 300 S Wacker ",
" Loop, ",
" ",
" ",
"TERM # 11000367",
"RECORD # 0656191",
"HOST INVOICE # 000038",
"HOST SEQ # 1720656191",
"MERCH ",
"INVOICE inv_123456789012",
" 3456789012354678",
" 901 ",
"------------------------",
"CARD ************0011",
"VISA Contact",
"07/10/2024 20:03:05",
"------------------------",
" VOID SALE ",
" ",
"TOTAL USD $10.00",
"------------------------",
"AUTH#:000AAA B:171",
" ",
" APPROVED 00 ",
" THANK YOU ",
" ",
" Visa Credit ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" CUSTOMER COPY "
]
},
"timestamp": "2025-05-27T18:49:31Z",
"resultCode": 0,
"resultText": "APPROVED",
"orderNumber": "order_number_1234",
"referenceId": "ref_s192i49i",
"invoiceNumber": "inv_1234567890123456789012354678901",
"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",
"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"
}
]
}
Response examples (400)
{
"code": 2000,
"status": "Rejected",
"message": "Refund request is invalid",
"traceId": "1-687e7080-78cb54a51c8121ee32df9e35",
"timestamp": "2025-06-21T16:53:20.9949208Z",
"errorDetails": [
{
"code": 2000,
"message": "Refund amount of 1000 exceeds the available balance of 0 for transaction ID trx_01J2F0EKHC7HY2R93C8ENBD1FG"
}
]
}
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": []
}