Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Order

Object

An official invoice — فاکتور رسمی.

Issued through سامانه مودیان, which accepts submissions asynchronously and is queried for their fate separately. status is therefore a state a theme has to render as a process, not a fact.

String

The invoice’s unique tax identifier — شماره منحصر به فرد مالیاتی.

Assigned at submission; null before that.

OfficialInvoiceStatus!

Where the submission has got to.

DateTime

When it was issued.

URL

A PDF of the invoice, once there is one.

String

Why it was rejected, as the tax system’s own code and message.

A pass-through of somebody else’s error, not this API’s taxonomy: it is actionable only by the merchant, and translating it would lose the code they will be asked to quote.

Enum

Where an official invoice’s submission has got to.

ValueMeaning
DRAFTRequested, not yet submitted.
QUEUEDWaiting to be sent.
SUBMITTEDSent; no verdict yet.
ACCEPTEDAccepted by سامانه مودیان.
REJECTEDRejected. rejectionReason says why.
CANCELLEDWithdrawn after acceptance.
Object

A placed order, as the buyer who placed it may see it.

Money is settled here in a way it is not in a cart: what the buyer paid is recorded, not recomputed. A price change after the fact does not move it.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String!

The merchant-facing order number — شماره سفارش.

A string, not an integer: merchants prefix them, and a leading zero that survives on a printed invoice must survive here.

DateTime!

When the order was placed.

OrderFinancialStatus!

Where the money stands.

OrderFulfillmentStatus!

Where the goods stand.

OrderStatus!

Open, or finished one way or another.

OrderLineConnection!

What was bought, at the prices actually charged.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

OrderCost!

What it came to.

OrderBuyer!

Who placed it.

Address

Where it is going. Null for an order that ships nothing.

[OrderPayment!]!

How it was paid, one entry per attempt that resulted in a movement of money.

A list because an order can be part-paid: a deposit online and the rest on delivery, or two card-to-card transfers because a daily limit got in the way.

[Shipment!]!

Parcels sent so far. Empty until the merchant ships something.

OfficialInvoice

The official invoice, when one was requested — فاکتور رسمی.

Null when it was not. Present but not yet ACCEPTED while it is still with سامانه مودیان, which is asynchronous and can take a while; a theme should say “در حال صدور” rather than treat it as a failure.

DeliveryMethodType!

How it was delivered, or is going to be.

String

The chosen delivery option’s name, as the buyer saw it at checkout.

String

The note the buyer left.

[Attribute!]!

Key/value data carried over from the cart.

DateTime

When it was cancelled, or null.

OrderCancelReason

Why, when it was cancelled.

URL

Where to send the buyer to finish paying. What a «پرداخت مجدد» button opens.

Present while financialStatus is PENDING or PARTIALLY_PAID, and the merchant still accepts the order.

PARTIALLY_PAID is not an edge case here. Iranian card-to-card transfers are capped daily, so paying a large order in two receipts is ordinary — and until this covered it, the buyer who paid half had an order showing what they still owed and no way to pay it. The merchant could see the debt; the person with the money could not settle it.

It collects cost.outstandingAmount, not the total. A buyer who has paid four million of six is asked for two.

The rejected alternative — a storefront mutation to submit a receipt directly — puts the most fraud-prone flow on the public API and gives up hosted checkout’s single audited place for it.

Metafield

One of this order’s metafields, or null when it is unset or not published to the storefront — the two are deliberately indistinguishable.

ArgumentTypeMeaning
namespaceStringThe owning app, or custom for a merchant’s own. Defaults to custom.
keyString!The metafield’s key within its namespace.

[Metafield]!

Several of this order’s metafields at once.

The result is positional: one entry per identifier, in the order asked, null where there is nothing to return.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!The metafields to fetch. The result has one entry per identifier.
Object

Who placed the order.

String!

The mobile number the order was placed with.

String

The email, when one was given.

String

The buyer’s name, from the order rather than from any account.

Customer

The account it was placed from, or null for a guest order.

Enum

Why an order was cancelled.

ValueMeaning
CUSTOMERThe buyer asked.
INVENTORYThe stock was not really there.
PAYMENT_FAILEDPayment never completed.
FRAUDJudged fraudulent.
DELIVERY_REFUSEDThe parcel was refused on delivery — عدم تحویل. Its own reason rather than CUSTOMER, because refusing a cash-on-delivery parcel costs the merchant the outbound freight and has to be countable.
OTHERSomething else; the merchant may have left a note.
Object

What an order came to.

Money!

Lines before discounts.

Money!

Everything taken off.

Money!

Delivery charged.

Money!

VAT charged — مالیات بر ارزش افزوده.

Money!

What the chosen payment method added — a cash-on-delivery charge, or a payer-borne gateway fee.

Zero when the merchant absorbed it, which is the common case. Recorded separately because it is the one component of the total the buyer could still change after leaving the cart.

Money!

The total charged.

Money!

How much of it has actually been received.

Money!

How much has been given back.

Money!

What is still owed — the total less what was paid and plus nothing else.

Non-zero on a cash-on-delivery order until the courier hands the money over, and on a part-paid order until the rest arrives.

Enum

Where an order’s money stands.

ValueMeaning
PENDINGPlaced, nothing received — an unpaid gateway attempt, or cash on delivery.
AUTHORIZEDThe buyer’s bank confirmed a hold but the platform has not yet verified with the gateway — پرداخت در انتظار تأیید. A real and common state in Iran, and one that can last: it is where an order sits when a callback was lost, until the reconciliation job catches up. Show it as “در حال بررسی پرداخت”, never as failed.
PARTIALLY_PAIDSome of the total is in.
PAIDAll of it is in.
PARTIALLY_REFUNDEDSome of it has gone back.
REFUNDEDAll of it has gone back.
FAILEDPayment was attempted and did not succeed.
VOIDEDWritten off without payment.
Enum

Where an order’s goods stand.

ValueMeaning
UNFULFILLEDNo description.
PARTIALLY_FULFILLEDNo description.
FULFILLEDNo description.
RESTOCKEDEverything shipped has been returned.
Object

One line of a placed order.

ID!

A globally unique, opaque identifier. Never parse or construct one.

ProductVariant

What was bought, if it still exists.

Null when the merchant has since deleted the product — which is exactly why the fields below duplicate it. An order must still render years later, when the catalogue has moved on.

String!

The product’s title as it was when bought.

String

The variant’s title as it was when bought.

String

The SKU as it was when bought.

Image

The image as it was when bought.

Int!

How many were bought.

Int!

How many have shipped.

Int!

How many were refunded.

Money!

The unit price actually charged.

Money!

The unit price after discounts.

Money!

discountedUnitPrice × quantity.

[Attribute!]!

Line-level key/value data carried over from the cart.

Object

A page of order lines.

[OrderLineEdge!]!

Each OrderLine with its cursor. Use this when you need to page.

[OrderLine!]!

The OrderLines themselves, unwrapped. Use this when you do not.

PageInfo!

Whether there is more, and the cursors to ask with.

Object

One order line, with its cursor.

String!

This position in the current ordering. Pass it as after or before.

OrderLine!

The OrderLine at this position.

Object

One movement of money against an order.

PaymentMethodType!

How it was paid.

String

The provider’s name — زرین‌پال, زیبال. Null for cash on delivery.

PaymentStatus!

Where this attempt got to.

Money!

How much moved.

String

The gateway’s reference number — شماره پیگیری.

What a buyer quotes to their bank and to the merchant’s support. Render it prominently and make it selectable; it is the single most-copied string on a thank-you page.

String

The card network’s retrieval reference number — شماره مرجع / RRN.

What a bank’s own records key on, which is what makes it the one that settles an argument about whether a charge happened.

String

The paying card, masked as 6037-99**-****-1234. Never the full number.

DateTime

When the money moved.

[PaymentReceipt!]!

The uploaded receipts, for a card-to-card payment — رسید کارت به کارت.

More than one is ordinary: daily transfer limits mean a large order is paid in several transfers, each with its own receipt awaiting the merchant’s approval. Empty for every other method.

Enum

Whether an order is still live.

ValueMeaning
OPENNo description.
CLOSEDNo description.
CANCELLEDNo description.
Object

A receipt a buyer uploaded for a manual transfer.

Image

The receipt image the buyer uploaded — فیش واریزی.

String

The transfer reference the buyer typed in.

Money

How much the buyer says was transferred.

DateTime

When the buyer says it was transferred.

ReceiptStatus!

Where the merchant’s review of it stands.

DateTime!

When it was submitted.

Enum

Where a payment attempt got to.

ValueMeaning
INITIATEDStarted; the buyer has not returned from the gateway.
AUTHORIZEDThe bank confirmed a hold; the platform has not yet verified it.
PAIDVerified with the gateway. This is the only status that means paid.
FAILEDRejected, cancelled, or timed out.
REFUNDEDReturned to the buyer.
UNRESOLVEDMoney is believed to have moved, but the gateway has not confirmed it and the reconciliation job has not yet resolved which way it went — تراکنش نامشخص. It lasts until the reconciliation job resolves it. A state of its own by design, and the reason this API can be trusted: the alternative is calling it failed and taking a second payment from a buyer who already paid.
Enum

Where a merchant’s review of a receipt stands.

ValueMeaning
PENDINGNo description.
APPROVEDNo description.
REJECTEDNo description.
Object

A parcel sent against an order.

ID!

A globally unique, opaque identifier. Never parse or construct one.

Carrier

Who is carrying it.

String

The tracking number — کد رهگیری مرسوله.

Iran Post’s is 24 digits; other carriers differ. Show it selectable.

URL

Where the buyer can follow it, when the carrier offers a page.

ShipmentStatus!

Where it has got to.

[ShipmentLine!]!

Which lines, and how many of each, are in this parcel.

DateTime

When it left.

DateTime

When it arrived.

DeliveryWindow

When it is expected.

Object

How much of one order line is in a parcel.

OrderLine!

Which line of the order this parcel carries part of.

Int!

How many of that line are in this parcel. Less than the line ordered when a shipment was split.

Enum

Where a parcel has got to.

ValueMeaning
PENDINGCreated but not yet handed over.
IN_TRANSITWith the carrier.
OUT_FOR_DELIVERYOut with the courier.
DELIVEREDHanded over. The terminal state for a parcel that arrived.
ATTEMPTED_DELIVERYThe carrier tried and could not deliver.
REFUSEDThe buyer refused the parcel — مرجوعی.
RETURNEDComing back.
FAILUREThe carrier reported a problem.