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.
Body
object
Required
The request to refund or void a previously completed transaction.
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":"ref_order_1234","referenceId":"ref_refund_12345","invoiceNumber":"ref_inv_12345678","originalTransactionId":"trx_01J2F0EKHC7HY2R93C8ENBD1FG"}'
Request examples
Refund using original transaction ID
{
"amount": 1000,
"orderNumber": "ref_order_1234",
"referenceId": "ref_refund_12345",
"invoiceNumber": "ref_inv_12345678",
"originalTransactionId": "trx_01J2F0EKHC7HY2R93C8ENBD1FG"
}
{
"amount": 1000,
"orderNumber": "ref_order_1234",
"referenceId": "ref_refund_12345",
"invoiceNumber": "ref_inv_12345678",
"originalReferenceId": "ref_s192i49i"
}
Response examples (200)
A successful response for a refund transaction.
{
"id": "trx_01J2F0ZJ2JW5B63CJFPXRGAB1S",
"type": "Refund",
"receipt": {
"lines": [
" Test Merchant ",
" 300 S Wacker ",
" Loop, ",
" ",
" ",
"TERM # 11000367",
"RECORD # 0656191",
"HOST INVOICE # 000038",
"HOST SEQ # 1720656191",
"MERCH INVOICE. fgj24344",
"------------------------",
"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. fgj24344",
"------------------------",
"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": "Successful transaction request",
"orderNumber": "ref_order_1234",
"referenceId": "ref_s192i49i",
"invoiceNumber": "ref_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",
"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": "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"
}
]
}
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": []
}