Order
OfficialInvoice
Section titled “OfficialInvoice”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.
status
Section titled “status”OfficialInvoiceStatus!
Where the submission has got to.
issuedAt
Section titled “issuedAt”DateTime
When it was issued.
documentUrl
Section titled “documentUrl”URL
A PDF of the invoice, once there is one.
rejectionReason
Section titled “rejectionReason”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.
OfficialInvoiceStatus
Section titled “OfficialInvoiceStatus”Where an official invoice’s submission has got to.
| Value | Meaning |
|---|---|
DRAFT | Requested, not yet submitted. |
QUEUED | Waiting to be sent. |
SUBMITTED | Sent; no verdict yet. |
ACCEPTED | Accepted by سامانه مودیان. |
REJECTED | Rejected. rejectionReason says why. |
CANCELLED | Withdrawn after acceptance. |
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.
number
Section titled “number”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.
placedAt
Section titled “placedAt”DateTime!
When the order was placed.
financialStatus
Section titled “financialStatus”OrderFinancialStatus!
Where the money stands.
fulfillmentStatus
Section titled “fulfillmentStatus”OrderFulfillmentStatus!
Where the goods stand.
status
Section titled “status”OrderStatus!
Open, or finished one way or another.
OrderLineConnection!
What was bought, at the prices actually charged.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
OrderCost!
What it came to.
OrderBuyer!
Who placed it.
shippingAddress
Section titled “shippingAddress”Address
Where it is going. Null for an order that ships nothing.
payments
Section titled “payments”[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.
shipments
Section titled “shipments”[Shipment!]!
Parcels sent so far. Empty until the merchant ships something.
invoice
Section titled “invoice”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.
deliveryMethod
Section titled “deliveryMethod”DeliveryMethodType!
How it was delivered, or is going to be.
deliveryOptionTitle
Section titled “deliveryOptionTitle”String
The chosen delivery option’s name, as the buyer saw it at checkout.
String
The note the buyer left.
attributes
Section titled “attributes”[Attribute!]!
Key/value data carried over from the cart.
cancelledAt
Section titled “cancelledAt”DateTime
When it was cancelled, or null.
cancelReason
Section titled “cancelReason”OrderCancelReason
Why, when it was cancelled.
resumePaymentUrl
Section titled “resumePaymentUrl”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
Section titled “metafield”Metafield
One of this order’s metafields, or null when it is unset or not published to the storefront — the two are deliberately indistinguishable.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | The owning app, or custom for a merchant’s own. Defaults to custom. |
key | String! | The metafield’s key within its namespace. |
metafields
Section titled “metafields”[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.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | The metafields to fetch. The result has one entry per identifier. |
OrderBuyer
Section titled “OrderBuyer”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
Section titled “customer”Customer
The account it was placed from, or null for a guest order.
OrderCancelReason
Section titled “OrderCancelReason”Why an order was cancelled.
| Value | Meaning |
|---|---|
CUSTOMER | The buyer asked. |
INVENTORY | The stock was not really there. |
PAYMENT_FAILED | Payment never completed. |
FRAUD | Judged fraudulent. |
DELIVERY_REFUSED | The 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. |
OTHER | Something else; the merchant may have left a note. |
OrderCost
Section titled “OrderCost”What an order came to.
subtotalAmount
Section titled “subtotalAmount”Money!
Lines before discounts.
totalDiscountAmount
Section titled “totalDiscountAmount”Money!
Everything taken off.
totalShippingAmount
Section titled “totalShippingAmount”Money!
Delivery charged.
totalTaxAmount
Section titled “totalTaxAmount”Money!
VAT charged — مالیات بر ارزش افزوده.
totalPaymentFeeAmount
Section titled “totalPaymentFeeAmount”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.
totalAmount
Section titled “totalAmount”Money!
The total charged.
totalPaidAmount
Section titled “totalPaidAmount”Money!
How much of it has actually been received.
totalRefundedAmount
Section titled “totalRefundedAmount”Money!
How much has been given back.
outstandingAmount
Section titled “outstandingAmount”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.
OrderFinancialStatus
Section titled “OrderFinancialStatus”Where an order’s money stands.
| Value | Meaning |
|---|---|
PENDING | Placed, nothing received — an unpaid gateway attempt, or cash on delivery. |
AUTHORIZED | The 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_PAID | Some of the total is in. |
PAID | All of it is in. |
PARTIALLY_REFUNDED | Some of it has gone back. |
REFUNDED | All of it has gone back. |
FAILED | Payment was attempted and did not succeed. |
VOIDED | Written off without payment. |
OrderFulfillmentStatus
Section titled “OrderFulfillmentStatus”Where an order’s goods stand.
| Value | Meaning |
|---|---|
UNFULFILLED | No description. |
PARTIALLY_FULFILLED | No description. |
FULFILLED | No description. |
RESTOCKED | Everything shipped has been returned. |
OrderLine
Section titled “OrderLine”One line of a placed order.
ID!
A globally unique, opaque identifier. Never parse or construct one.
variant
Section titled “variant”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.
variantTitle
Section titled “variantTitle”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.
quantity
Section titled “quantity”Int!
How many were bought.
fulfilledQuantity
Section titled “fulfilledQuantity”Int!
How many have shipped.
refundedQuantity
Section titled “refundedQuantity”Int!
How many were refunded.
originalUnitPrice
Section titled “originalUnitPrice”Money!
The unit price actually charged.
discountedUnitPrice
Section titled “discountedUnitPrice”Money!
The unit price after discounts.
totalPrice
Section titled “totalPrice”Money!
discountedUnitPrice × quantity.
attributes
Section titled “attributes”[Attribute!]!
Line-level key/value data carried over from the cart.
OrderLineConnection
Section titled “OrderLineConnection”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
Section titled “pageInfo”PageInfo!
Whether there is more, and the cursors to ask with.
OrderLineEdge
Section titled “OrderLineEdge”One order line, with its cursor.
cursor
Section titled “cursor”String!
This position in the current ordering. Pass it as after or before.
OrderLine!
The OrderLine at this position.
OrderPayment
Section titled “OrderPayment”One movement of money against an order.
method
Section titled “method”PaymentMethodType!
How it was paid.
gatewayName
Section titled “gatewayName”String
The provider’s name — زرینپال, زیبال. Null for cash on delivery.
status
Section titled “status”PaymentStatus!
Where this attempt got to.
amount
Section titled “amount”Money!
How much moved.
referenceNumber
Section titled “referenceNumber”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.
retrievalReferenceNumber
Section titled “retrievalReferenceNumber”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.
cardMask
Section titled “cardMask”String
The paying card, masked as 6037-99**-****-1234. Never the full number.
paidAt
Section titled “paidAt”DateTime
When the money moved.
receipts
Section titled “receipts”[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.
OrderStatus
Section titled “OrderStatus”Whether an order is still live.
| Value | Meaning |
|---|---|
OPEN | No description. |
CLOSED | No description. |
CANCELLED | No description. |
PaymentReceipt
Section titled “PaymentReceipt”A receipt a buyer uploaded for a manual transfer.
Image
The receipt image the buyer uploaded — فیش واریزی.
referenceNumber
Section titled “referenceNumber”String
The transfer reference the buyer typed in.
amount
Section titled “amount”Money
How much the buyer says was transferred.
transferredAt
Section titled “transferredAt”DateTime
When the buyer says it was transferred.
status
Section titled “status”ReceiptStatus!
Where the merchant’s review of it stands.
submittedAt
Section titled “submittedAt”DateTime!
When it was submitted.
PaymentStatus
Section titled “PaymentStatus”Where a payment attempt got to.
| Value | Meaning |
|---|---|
INITIATED | Started; the buyer has not returned from the gateway. |
AUTHORIZED | The bank confirmed a hold; the platform has not yet verified it. |
PAID | Verified with the gateway. This is the only status that means paid. |
FAILED | Rejected, cancelled, or timed out. |
REFUNDED | Returned to the buyer. |
UNRESOLVED | Money 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. |
ReceiptStatus
Section titled “ReceiptStatus”Where a merchant’s review of a receipt stands.
| Value | Meaning |
|---|---|
PENDING | No description. |
APPROVED | No description. |
REJECTED | No description. |
Shipment
Section titled “Shipment”A parcel sent against an order.
ID!
A globally unique, opaque identifier. Never parse or construct one.
carrier
Section titled “carrier”Carrier
Who is carrying it.
trackingNumber
Section titled “trackingNumber”String
The tracking number — کد رهگیری مرسوله.
Iran Post’s is 24 digits; other carriers differ. Show it selectable.
trackingUrl
Section titled “trackingUrl”URL
Where the buyer can follow it, when the carrier offers a page.
status
Section titled “status”ShipmentStatus!
Where it has got to.
[ShipmentLine!]!
Which lines, and how many of each, are in this parcel.
shippedAt
Section titled “shippedAt”DateTime
When it left.
deliveredAt
Section titled “deliveredAt”DateTime
When it arrived.
estimatedDelivery
Section titled “estimatedDelivery”DeliveryWindow
When it is expected.
ShipmentLine
Section titled “ShipmentLine”How much of one order line is in a parcel.
orderLine
Section titled “orderLine”OrderLine!
Which line of the order this parcel carries part of.
quantity
Section titled “quantity”Int!
How many of that line are in this parcel. Less than the line ordered when a shipment was split.
ShipmentStatus
Section titled “ShipmentStatus”Where a parcel has got to.
| Value | Meaning |
|---|---|
PENDING | Created but not yet handed over. |
IN_TRANSIT | With the carrier. |
OUT_FOR_DELIVERY | Out with the courier. |
DELIVERED | Handed over. The terminal state for a parcel that arrived. |
ATTEMPTED_DELIVERY | The carrier tried and could not deliver. |
REFUSED | The buyer refused the parcel — مرجوعی. |
RETURNED | Coming back. |
FAILURE | The carrier reported a problem. |