API reference · Billing & payment gateway
Get payment (result page)
get
/billing/payments/{id}| Authentication | Customer token (Bearer) |
|---|---|
| Access | Free user · Pro user Customer token (Bearer) — free and paid users |
Status of one own payment for /app/checkout/result?payment= (success → receipt; failed → «پرداخت ناموفق», retry, account stays free). In Postman run «Checkout» or «List own payments» first so {{paymentId}} is set (the demo account has no payments; an empty id would hit the list route).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id* | path | integer | Postman variable {{paymentId}} |
Responses
200 — Payment
| Field | Type | Description |
|---|---|---|
id* | integer | Unique ID. |
period* | string | |
status* | string | Current status. |
base_amount* | integer | |
period_discount* | integer | |
code_discount* | integer | |
vat* | integer | |
total* | integer | |
currency* | string | Currency code, e.g. USD, EUR or IRT. |
tracking_code* | string | null | |
gateway_message* | string | null | |
gateway_name* | string | null | |
period_start* | string | null | |
period_end* | string | null | |
paid_at* | string | null | |
created_at* | string | null | When it was created (ISO 8601). |
auto_renew* | boolean | |
renewal_amount* | integer | null | «Renew automatically» (Stripe subscription) |
amount_refunded* | integer | Refunds (status refunded / partially_refunded): total refunded so far and when the last one was made. |
refunded_at* | string | null |
json
{
"id": 19,
"period": "quarterly",
"status": "success",
"base_amount": 5400000,
"period_discount": 540000,
"code_discount": 1458000,
"vat": 340200,
"total": 3742200,
"currency": "IRT",
"tracking_code": "427999304",
"gateway_message": null,
"gateway_name": "درگاه بانکی (آزمایشی)",
"period_start": "2026-10-25T00:00:00Z",
"period_end": "2027-01-25T00:00:00Z",
"paid_at": "2026-10-25T11:42:00Z",
"created_at": "2026-10-25T11:42:00Z"
}
401 — Missing/invalid token, or a token of the wrong owner (admin token on a user route or vice versa): {"message":"…","code":"unauthenticated"} (message in the request language)
| Field | Type |
|---|---|
message* | string |
code | string |
json
{
"message": "Please sign in to continue; your session has ended or is not valid.",
"code": "unauthenticated"
}
404 — Unknown id (or not owned by the caller)
| Field | Type |
|---|---|
message* | string |
json
{
"message": ""
}
curl example
bash
curl -X GET 'http://127.0.0.1:8010/api/billing/payments/{id}' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"