Rawi

مرجع API · Billing & payment gateway

Plans & periods

get/billing/plans
احراز هویتتوکن مشتری (Bearer)
سطح دسترسیکاربر رایگان · کاربر حرفه‌ای

Customer token (Bearer) — free and paid users

Same data as /public/plans for signed-in users, except online_payment_available: here it is true only when the caller has at least one usable gateway (the list GET /billing/gateways returns is not empty). currency is the caller's currency: default_currency when one of the caller's usable gateways takes it, otherwise the first usable gateway's currency. Example for an international user: {"currency":"USD","monthly_price":6000,"vat_percent":0,"periods":[…{"key":"quarterly","price":16200,…}]}.

پاسخ‌ها

200 — PlansResponse

json
[
  null
]

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)

فیلدنوع
message*string
codestring
json
{
  "message": "Please sign in to continue; your session has ended or is not valid.",
  "code": "unauthenticated"
}

نمونهٔ curl

bash
curl -X GET 'http://127.0.0.1:8010/api/billing/plans' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN"

امتحان در کنسول