Skip to main content
The refund endpoint handles both full and partial refunds for completed transactions. When you submit a refund, the engine performs a rounding normalization check: it verifies that the refund’s rounding delta correctly mirrors the direction of the original transaction’s rounding. This prevents scenarios where a customer is refunded a rounded amount that doesn’t correspond to what they originally paid. The refund is committed to the audit hash chain as a separate record linked to the original transaction ID.

Endpoint

POST https://api.centsless.org/api/v1/transaction/refund

Authentication

x-api-key
string
required
Your merchant or partner API key.

Request body

original_transaction_id
string
required
The ID of the transaction being refunded.
refund_amount
integer
required
Refund amount in cents. For a full refund, pass the original cash_total_cents. For a partial refund, pass the partial amount.
void_reason
string
required
Reason code for the refund. One of: defective_product, customer_dissatisfied, wrong_item, price_adjustment.
voided_by
string
required
The employee ID of the person processing the refund.

Example

curl -X POST https://api.centsless.org/api/v1/transaction/refund \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "original_transaction_id": "TXN-2026-04-14-A82C2EAA",
    "refund_amount": 725,
    "void_reason": "defective_product",
    "voided_by": "EMP-001"
  }'
If the normalization check detects that the refund rounding delta does not correctly reverse the original transaction’s direction, the failure is flagged in the response and logged to the audit trail — but the refund is not blocked. Review flagged refunds in the void analytics and compliance reports.