Skip to content

API reference: Objects

The Refund object

A refund returns all or part of a paid payment to the payer.

A payment can be refunded several times, never beyond what was paid. Refund events carry this object in data.object.

Refund object
{
  "id": "0c8a1d52-6e7b-4f0a-9b3d-7d2e4a8c5f10",
  "object": "refund",
  "payment_id": "5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
  "amount": 150000,
  "currency": "DZD",
  "status": "succeeded",
  "reason": "Customer returned one item",
  "failure": null,
  "fees": {
    "satim": 800,
    "rais": 200,
    "total": 1000
  },
  "livemode": false,
  "created": 1793000900
}

Attributes

idstring

The unique identifier of the refund.

objectstring

The type of the object.

Always refund.

payment_idstring

The payment that was refunded.

amountinteger

The amount refunded, in centimes.

currencystring

The currency.

Always DZD.

statusstring

succeeded: SATIM refunded. failed: SATIM refused (see failure). pending: the request was sent but SATIM's answer was lost; the amount stays reserved until the refund is checked. Do not retry with a new Idempotency-Key before looking at it.

One of succeeded, failed, pending.

reasonstringnullable

The reason you gave.

failureobjectnullable

Why the refund failed; set when status is failed.

feesobjectnullable

What this refund cost you, in centimes, excluding VAT (a flat fee per refund, whatever its amount). Set once the refund succeeded; null while it is pending and when it failed (a refund that did not happen costs nothing). A test refund shows the simulated fees.

livemodeboolean

false for a sandbox refund.

createdinteger

When the refund was requested (Unix time, seconds).