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.
{
"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
idstringThe unique identifier of the payment.
objectstringThe type of the object.
Always payment.
statusstringWhere 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.
amountintegerThe amount, in centimes.
currencystringThe currency.
Always DZD.
descriptionstringnullableWhat the payment is for.
referencestringnullableYour own identifier of the order.
customerobjectnullableWho is paying, if known.
itemsarray of objectWhat is being bought (empty if not given).
metadataobjectYour key/value pairs, as sent.
livemodebooleanfalse for a sandbox (test) payment, true for a live one.
payment_pagestringThe page the payer pays on.
One of rais, satim.
checkout_urlstringThe hosted payment page. Redirect the payer here.
success_urlstringnullableWhere the payer is sent after paying.
cancel_urlstringnullableWhere the payer is sent if they cancel or fail.
expires_atintegernullableWhen an unpaid payment stops being payable (Unix time, seconds).
createdintegerWhen the payment was created (Unix time, seconds).
paid_atintegernullableWhen the payment was paid (Unix time, seconds).
amount_refundedintegerHow much has been refunded so far, in centimes.
refundedbooleanTrue once the payment is fully refunded.
feesobjectnullableWhat 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.
netintegernullableWhat you receive for this payment: amount minus fees.total, in centimes, before any refund. null until it is paid.
receipt_urlstringnullableWhere the receipt can be downloaded once the payment is paid.
failureobjectnullableWhy the payment failed; set when status is failed.
payment_methodobjectnullableHow the payer paid; set once the payment is paid.
processorobjectWhat the processor (SATIM) knows about the payment.