API reference · Settings
Get account & receipts
get
/settings/account| Authentication | Customer token (Bearer) |
|---|---|
| Access | Free user · Pro user Customer token (Bearer) — free and paid users |
Email (null for phone-only accounts), verified phone, SMS-notification switch, plan, period, renewal date and receipts (successful/refunded payments).
Responses
200 — AccountSettings
| Field | Type | Description |
|---|---|---|
email* | string | null | Email address. |
phone* | string | null | Mobile number. |
sms_notifications* | boolean | |
email_notifications* | object | |
email_notifications.reminders* | boolean | |
email_notifications.report_ready* | boolean | |
email_notifications.renewal* | boolean | |
plan* | string ("paid", "free") | S5: reminders, report_ready, renewal |
billing_period* | string | null | |
plan_expires_at* | string | null | |
payments* | object[] | |
payments[].id* | integer | Unique ID. |
payments[].period* | string | |
payments[].status* | string | Current status. |
payments[].base_amount* | integer | |
payments[].period_discount* | integer | |
payments[].code_discount* | integer | |
payments[].vat* | integer | |
payments[].total* | integer | |
payments[].currency* | string | Currency code, e.g. USD, EUR or IRT. |
payments[].tracking_code* | string | null | |
payments[].gateway_message* | string | null | |
payments[].gateway_name* | string | null | |
payments[].period_start* | string | null | |
payments[].period_end* | string | null | |
payments[].paid_at* | string | null | |
payments[].created_at* | string | null | When it was created (ISO 8601). |
payments[].auto_renew* | boolean | |
payments[].renewal_amount* | integer | null | «Renew automatically» (Stripe subscription) |
payments[].amount_refunded* | integer | Refunds (status refunded / partially_refunded): total refunded so far and when the last one was made. |
payments[].refunded_at* | string | null | |
renewal* | object | Automatic renewal (Stripe subscription): renews_at / ends_at, cancel or resume (POST /billing/subscription). |
renewal.auto* | boolean | |
renewal.status* | string | null | Current status. |
renewal.can_cancel* | boolean | active | past_due | cancel_at_period_end | none |
renewal.can_resume* | boolean | |
renewal.renews_at* | string | null | |
renewal.ends_at* | string | null | |
brand_names* | any[] | «Delete account» accepts any of these (or the email) as the typed confirmation. |
json
{
"email": "demo@rawi.local",
"phone": "+989120000077",
"sms_notifications": true,
"plan": "paid",
"billing_period": "quarterly",
"plan_expires_at": "2027-01-25T00:00:00Z",
"payments": [
{
"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",
"auto_renew": false,
"renewal_amount": null
}
],
"renewal": {
"auto": false,
"status": "none",
"can_cancel": false,
"can_resume": false,
"renews_at": null,
"ends_at": "2027-01-25T00:00: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"
}
curl example
bash
curl -X GET 'http://127.0.0.1:8010/api/settings/account' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"