Orders
Carrier
Section titled “Carrier”A delivery company.
String!
A stable code: IRAN_POST, TIPAX, CHAPAR, ALOPEYK, SNAPP_BOX.
String!
The carrier’s name in the current locale.
Image
The carrier’s mark.
DeliveryMethodType
Section titled “DeliveryMethodType”How an order reached, or will reach, the buyer.
| Value | Meaning |
|---|---|
SHIPPING | No description. |
PICKUP | No description. |
LOCAL_DELIVERY | No description. |
NONE | Nothing shipped — a digital product. |
DeliveryWindow
Section titled “DeliveryWindow”When something should arrive.
Both bounds may be null when the carrier will not commit to an estimate, which several Iranian couriers will not.
DateTime
No description.
DateTime
No description.
businessDays
Section titled “businessDays”Int
Business days, as the carrier states it.
Alongside the timestamps rather than derived from them: “۲ تا ۳ روز کاری” is what the carrier promised, and the timestamps are this platform’s reading of it against a holiday calendar.
OfficialInvoice
Section titled “OfficialInvoice”An official invoice — فاکتور رسمی.
Issued through سامانه مودیان, which accepts submissions asynchronously and is
queried for their fate separately. status is therefore a process to render,
not a fact.
String
The invoice’s unique tax identifier — شماره منحصر به فرد مالیاتی.
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 rather than 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 | No description. |
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 was paid is recorded, not recomputed. A merchant changing a price afterwards does not move it.
ID!
No description.
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. |
totalQuantity
Section titled “totalQuantity”Int!
How many units the order holds, for a history row that does not page the lines to say “۳ کالا”.
OrderCost!
What it came to.
shippingAddress
Section titled “shippingAddress”Address
Where it went. Null for an order that shipped nothing.
payments
Section titled “payments”[OrderPayment!]!
How it was paid, one entry per movement of money.
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.
invoiceDocument
Section titled “invoiceDocument”PrintedDocument
The order’s invoice as a PDF — the buyer’s فاکتور, and the only document a buyer is given for an order.
The same document the merchant downloads, drawn from the shop’s filing
of the sale: type 1 naming the company or person it was bought for by their
identifier, or type 2 naming nobody, in the shop’s money unit and calendar.
A test order has none (UNAVAILABLE, TEST_ORDER), and neither does an
order of a shop that has not recorded its economic code
(SELLER_UNIDENTIFIED) — draw no button for either.
The signed-in buyer’s own orders only, as everything under customer:
there is no way to reach another buyer’s order, so there is none to reach
their invoice.
Drawn once, on request. Read status with the page, and read url with
draw: true when the buyer presses download: that draws it the first time
anybody asks, and the link is minted on each read and lives minutes.
Null when the tax service does not answer — the order still renders.
| Argument | Type | Meaning |
|---|---|---|
draw | Boolean! · default false | No description. |
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 at checkout.
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. It leads to hosted checkout, which owns the
payment step here exactly as it does from a cart.
PARTIALLY_PAID is ordinary rather than exceptional: daily card-to-card
transfer caps make paying a large order in two receipts routine, and the
buyer who paid the first half needs a door back in for the second.
It collects cost.outstandingAmount, not the total.
statusUrl
Section titled “statusUrl”URL!
A link to this order’s page on the storefront, carrying its own access token.
The same link that goes out by SMS. Useful for a buyer forwarding an order to whoever is receiving the parcel.
metafield
Section titled “metafield”Metafield
Custom data an app attached to this order — an RMA reference, loyalty points earned, a gift message an app collected.
The same data the Storefront API exposes on the thank-you page, so an account page and a confirmation page render an app’s additions identically.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | No description. |
key | String! | No description. |
metafields
Section titled “metafields”[Metafield]!
No description.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | No description. |
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 | No description. |
OrderConnection
Section titled “OrderConnection”A page of orders.
[OrderEdge!]!
No description.
[Order!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
No description.
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.
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.
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.
OrderEdge
Section titled “OrderEdge”One order, with its cursor.
cursor
Section titled “cursor”String!
No description.
Order!
No description.
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 bank confirmed a hold but the platform has not yet verified with the gateway — پرداخت در انتظار تأیید. A real state, and one that can last: it is where an order sits when a callback was lost, until the reconciliation job catches up. Render it as “در حال بررسی پرداخت”. Rendering it as failed is how a buyer who already paid pays twice. |
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!
No description.
String!
The product’s title as it was when bought.
A snapshot, not a lookup. A merchant who renames or deletes a product does not rewrite the buyer’s history, and an order from two years ago must still render.
variantTitle
Section titled “variantTitle”String
The variant’s title as it was when bought — آبی / XL.
String
The SKU as it was when bought.
Image
The image as it was when bought — a snapshot, like the title.
productHandle
Section titled “productHandle”Handle
The product’s slug, for linking back to it — when it still exists.
Null for a product the merchant has deleted. Draw the row without a link rather than a link that 404s.
productId
Section titled “productId”ID
The product’s current id, for a “buy it again” that adds to a cart through the Storefront API. Null when the product is gone.
variantId
Section titled “variantId”ID
The variant’s current id. Null when the variant is gone.
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, before line discounts.
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!]!
No description.
[OrderLine!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
OrderLineEdge
Section titled “OrderLineEdge”One order line, with its cursor.
cursor
Section titled “cursor”String!
No description.
OrderLine!
No description.
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 support. Render it selectable; it is the single most-copied string in an order history.
retrievalReferenceNumber
Section titled “retrievalReferenceNumber”String
The card network’s retrieval reference number — شماره مرجع / RRN.
What the 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!]!
Receipts uploaded for a card-to-card payment — رسید کارت به کارت.
More than one is ordinary: daily transfer limits mean a large order is paid in several transfers, each awaiting the merchant’s approval. Empty for every other method.
OrderSortKeys
Section titled “OrderSortKeys”How an order list is ordered.
| Value | Meaning |
|---|---|
PLACED_AT | No description. |
TOTAL | No description. |
NUMBER | No description. |
OrderStatus
Section titled “OrderStatus”Whether an order is still live.
| Value | Meaning |
|---|---|
OPEN | No description. |
CLOSED | No description. |
CANCELLED | No description. |
PaymentMethodType
Section titled “PaymentMethodType”How a buyer paid.
| Value | Meaning |
|---|---|
ONLINE_GATEWAY | A Shaparak-connected gateway, reached by redirect — درگاه پرداخت. |
CASH_ON_DELIVERY | Cash collected on delivery — پرداخت در محل. |
CARD_TO_CARD | A transfer to the merchant’s card or SHEBA, with a receipt — کارت به کارت. |
WALLET | Store credit or a gift card — کیف پول. |
INSTALLMENT | A buy-now-pay-later or instalment provider — اقساطی. |
PaymentReceipt
Section titled “PaymentReceipt”A receipt the buyer uploaded for a manual transfer.
Image
The uploaded image — فیش واریزی.
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!
No description.
PaymentStatus
Section titled “PaymentStatus”Where a payment attempt got to.
| Value | Meaning |
|---|---|
INITIATED | Started; the buyer never returned from the gateway. |
AUTHORIZED | The bank confirmed a hold; the platform has not yet verified it. |
PAID | Verified with the gateway. 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 reconciliation has not yet resolved which way it went — تراکنش نامشخص. It lasts until reconciliation resolves it. Say so plainly to the buyer: an order stuck here with no explanation produces a support call, and one labelled “ناموفق” produces a second payment. |
PrintedDocument
Section titled “PrintedDocument”A document drawn from a record and kept — here, an order’s invoice — as a PDF.
Private, always: url is a link signed for minutes, minted on each read,
and the file behind it is never public. Drawn once per version, never per
download.
status
Section titled “status”PrintedDocumentStatus!
No description.
unavailableReason
Section titled “unavailableReason”PrintedDocumentUnavailableReason
Why there is none. Set with UNAVAILABLE, and only then.
URL
A short-lived link to the PDF. Set with READY, and only then; it expires
within minutes, so read it when it is about to be opened.
PrintedDocumentStatus
Section titled “PrintedDocumentStatus”Where a printed document stands.
| Value | Meaning |
|---|---|
NOT_DRAWN | None yet. Read with draw: true, it is drawn. |
DRAWING | Being drawn. Read again in a few seconds. |
READY | Drawn. url is set. |
FAILED | Drawing it failed, and it is not drawn again for this version. |
UNAVAILABLE | There is nothing to draw. unavailableReason says why. |
PrintedDocumentUnavailableReason
Section titled “PrintedDocumentUnavailableReason”Why a printed document cannot be drawn.
| Value | Meaning |
|---|---|
TEST_ORDER | A test order: no invoice is made for one. |
SELLER_UNIDENTIFIED | The shop has not recorded the economic code an invoice names it by. |
NOT_ISSUED | No invoice exists for the order yet, or it was cancelled before one was. |
NOT_BUILT | The invoice could not be built yet. Read again later. |
CANCELLED | Every invoice for the order was cancelled. |
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!
No description.
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. Render 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!
No description.
quantity
Section titled “quantity”Int!
No description.
ShipmentStatus
Section titled “ShipmentStatus”Where a parcel has got to.
| Value | Meaning |
|---|---|
PENDING | Created but not yet handed over. |
IN_TRANSIT | No description. |
OUT_FOR_DELIVERY | No description. |
DELIVERED | No description. |
ATTEMPTED_DELIVERY | The carrier tried and could not deliver. |
REFUSED | The buyer refused the parcel — مرجوعی. |
RETURNED | No description. |
FAILURE | The carrier reported a problem. |