Skip to content

API reference: Objects

The Payment object

A payment is one attempt to collect an amount from a payer.

You create it with POST /payments, send the payer to its checkout_url, and follow it until status is paid, or it fails, expires or is cancelled. Events about a payment carry this object in data.object.

Payment object
{
  "id": "5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
  "object": "payment",
  "status": "pending",
  "amount": 500000,
  "currency": "DZD",
  "description": "Order #1042",
  "reference": "order-1042",
  "customer": {
    "id": null,
    "name": "Amina Benali",
    "email": "amina@example.dz",
    "phone": "+213550000000"
  },
  "items": [
    {
      "name": "Running shoes",
      "description": null,
      "quantity": 2,
      "unit_amount": 250000
    }
  ],
  "metadata": {
    "cart_id": "c_8812"
  },
  "livemode": false,
  "payment_page": "rais",
  "checkout_url": "https://pay.rais.app/pay/5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
  "success_url": "https://shop.example/thanks",
  "cancel_url": "https://shop.example/cart",
  "expires_at": 1793003600,
  "created": 1793000000,
  "paid_at": null,
  "amount_refunded": 0,
  "refunded": false,
  "fees": null,
  "net": null,
  "receipt_url": null,
  "failure": null,
  "payment_method": null,
  "processor": {
    "name": "satim",
    "order_id": "V721uPPfNNofVQAAABL3",
    "approval_code": null,
    "response_code": null
  }
}

Attributes

idstring

The unique identifier of the payment.

objectstring

The type of the object.

Always payment.

statusstring

Where the payment stands. pending: waiting for the payer. paid: money received. failed: declined or errored (see failure). cancelled: you cancelled it. expired: nobody paid before expires_at. refunded / partially_refunded: money was returned. reversed: SATIM reversed the authorisation.

One of pending, paid, failed, cancelled, expired, refunded, partially_refunded, reversed.

amountinteger

The amount, in centimes.

currencystring

The currency.

Always DZD.

descriptionstringnullable

What the payment is for.

referencestringnullable

Your own identifier of the order.

customerobjectnullable

Who is paying, if known.

itemsarray of object

What is being bought (empty if not given).

metadataobject

Your key/value pairs, as sent.

livemodeboolean

false for a sandbox (test) payment, true for a live one.

payment_pagestring

The page the payer pays on.

One of rais, satim.

checkout_urlstring

The hosted payment page. Redirect the payer here.

success_urlstringnullable

Where the payer is sent after paying.

cancel_urlstringnullable

Where the payer is sent if they cancel or fail.

expires_atintegernullable

When an unpaid payment stops being payable (Unix time, seconds).

createdinteger

When the payment was created (Unix time, seconds).

paid_atintegernullable

When the payment was paid (Unix time, seconds).

amount_refundedinteger

How much has been refunded so far, in centimes.

refundedboolean

True once the payment is fully refunded.

feesobjectnullable

What this payment cost you, in centimes, excluding VAT: SATIM's fee and Raïs's fee. Set once the payment is paid, null before. A test payment shows the simulated fees. They are not returned when the payment is refunded; each refund has its own fee (see the Refund object). See the pricing page.

netintegernullable

What you receive for this payment: amount minus fees.total, in centimes, before any refund. null until it is paid.

receipt_urlstringnullable

Where the receipt can be downloaded once the payment is paid.

failureobjectnullable

Why the payment failed; set when status is failed.

payment_methodobjectnullable

How the payer paid; set once the payment is paid.

processorobject

What the processor (SATIM) knows about the payment.