Faraatarjomeh API
Pages

For AI agents: this page as Markdown at https://faraatarjomeh.com/api/v1/docs/reference/payments.md; all docs in one file at llms-full.txt.

API reference: Payments

The Payments endpoints (4 operations), generated from the OpenAPI document (https://faraatarjomeh.com/api/v1/openapi.json). For task-level walkthroughs use the guides; for error handling use /api/v1/docs/errors. The full reference: /api/v1/docs/reference.

At a glance#

Index#

Payments#

Fara packages and past payments. Buying happens on the website.

GET /api/v1/payment/packages#

List Fara packages

Buying happens on the website; it is not available over the API.

Response 200

PaymentPackages

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/payment/packages" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/payment/packages/public#

List Fara packages (public copy)

Response 200

PaymentPackages

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/payment/packages/public" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/payment/status/{authority}#

Get the status of a payment

Parameters

Name In Type Required Notes
authority path string yes Payment authority code from the payment gateway.

Response 200

PaymentStatus

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/payment/status/$AUTHORITY" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/payment/history#

List payments

Parameters

Name In Type Required Notes
page query integer no Page number, starting at 1. — default: 1; min 1
limit query integer no Items per page (1-100). — default: 20; min 1; max 100

Response 200

PaymentHistory

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/payment/history" \
  -H "Authorization: Bearer $FARA_API_KEY"

Schemas#

Named request and response objects used above. Nested objects are flattened as parent.child; arrays as parent[].child.

PaymentHistory#

Field Type Required Notes
payments object[] yes
total integer yes
page integer yes
limit integer no
totalPages integer yes

PaymentPackages#

Field Type Required Notes
vatRate number no Value added tax added at checkout, as a fraction (0.1 means 10%).
packages object[] yes
packages[].id string no
packages[].priceTomans number no Listed pack price in toman, before value added tax.
packages[].vatTomans number no Value added tax on this pack in toman (price × vatRate, rounded to the nearest toman, halves up).
packages[].totalTomans number no What you pay on the website: priceTomans + vatTomans.
packages[].creditFara number no Fara you get. VAT does not change it.
packages[].perFara number no
packages[].discount number no
packages[].shelf string no
packages[].description string no
gatewayEnabled boolean no Whether buying is open right now (on the website).

PaymentStatus#

Field Type Required Notes
authority string no
status string no
refId string | null no Bank reference, when completed. — may be null