Skip to content
API DocsDocs

Process Refund

Refunds — Process Refund

5 min readUpdated Mar 27, 2026

POST /api/v1/refunds/card

Refund a previously successful card payment (full or partial). The refund is linked to the original transaction via transactionId. Note: refunds are currently supported for card payments only — APM refunds are not available.

Guide: Initiating a Refund — conceptual walkthrough, flow diagrams, and integration patterns.

#Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {token} — see Authentication

#Request Body Parameters

FieldTypeRequiredDescription
requestIdStringYesUnique identifier for the request. Used for idempotency — if you retry with the same requestId, the system will return the original response instead of processing a duplicate.
midStringYesMerchant account ID. Identifies which merchant account the transaction is associated with.
transactionIdIntegerYesUnique transaction identifier assigned by Exirom. Use this ID to query status, retrieve info, or reference the transaction in support requests.
amountStringYesTransaction amount as a decimal string in major currency units (e.g. "10.00" = ten dollars). Values with more than two decimal places are automatically rounded.
reasonStringYesReason for the refund (e.g. customer_request, duplicate, fraudulent). Stored for reporting and reconciliation.
callbackUrlStringNoServer-to-server webhook URL. Exirom sends a POST with the final transaction result to this URL. See Webhook Callbacks.
metadataMap<String, String>NoArbitrary key-value pairs for your own use (e.g. order reference, campaign ID). Returned unchanged in responses and callbacks.

#Response

FieldTypeDescription
refundIdStringUnique identifier for the refund transaction.
transactionStatusString (NEW, PENDING, FAILED, REFUNDED, CUSTOMER_VERIFICATION, ...)Current status of the transaction. See Transaction Status Guide for the full lifecycle.
declineCodeIntegerNumeric code indicating the reason for a decline. Only present when the transaction is FAILED. See Decline Codes Reference.
paymentTypeString (CARD)Payment type identifier: CARD for card transactions, APM for alternative payment methods.
{
  "requestId": "req_abc123",
  "mid": "merchant_123",
  "transactionId": 12345,
  "amount": "100.00",
  "reason": "customer_request",
  "callbackUrl": "https://yourserver.com/callback",
  "metadata": {
    "key1": "value1"
  }
}
{
  "refundId": "example_refundId",
  "transactionStatus": "NEW",
  "declineCode": 12345,
  "paymentType": "CARD"
}

Idempotency: The requestId field ensures idempotent processing. If you retry a request with the same requestId, the original response is returned without reprocessing.

#Error Responses

HTTP StatusDescription
400Bad Request — missing or invalid parameters. Check the response body for field-level details.
401Unauthorized — missing, expired, or invalid bearer token. Re-authenticate via POST /api/v1/auth.
404Not Found — the requested resource does not exist.
500Internal Server Error — an unexpected error occurred. Retry with exponential backoff.
curl -X POST https://sandbox.api.exirom.com/api/v1/refunds/card \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
  "requestId": "req_abc123",
  "mid": "merchant_123",
  "transactionId": 12345,
  "amount": "100.00",
  "reason": "customer_request",
  "callbackUrl": "https://yourserver.com/callback",
  "metadata": {
    "key1": "value1"
  }
}'

#Try It

SandboxTry it
https://sandbox.api.exirom.com/api
Was this helpful?