Rawi

API reference · Billing & payment gateway

Gateways the user can pay with

get/billing/gateways
AuthenticationCustomer token (Bearer)
AccessFree user · Pro user

Customer token (Bearer) — free and paid users

Only gateways usable for a payment by the caller (PricingService::usableGateways) in the caller's currency (see GET /billing/plans): switched on in the admin panel, provider with a payment driver (mock, zarinpal, stripe) charging a currency it supports that has a price, show_for equal to the user's panel language (locale; for fa also gateways without show_for), and for test accounts only mode: test gateways. Sorted by position. name is name_en when the request language is en and name_en is set.

Responses

200 — Gateway[]

FieldTypeDescription
id*integerUnique ID.
name*string | null
description*string | string ("")
currency*stringCurrency code, e.g. USD, EUR or IRT.
provider*string
supports_auto_renew*boolean«Renew automatically» (Stripe subscription) can be chosen with this gateway.
json
[
  {
    "id": 1,
    "name": "درگاه بانکی (آزمایشی)",
    "description": "پرداخت با کارت‌های بانکی عضو شتاب.",
    "currency": "IRT",
    "provider": "zarinpal",
    "supports_auto_renew": false
  }
]

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)

FieldType
message*string
codestring
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/billing/gateways' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN"

Try it in the console