Payments
BankAccount
Section titled “BankAccount”A bank account money settles to.
ID!
No description.
ibanMasked
Section titled “ibanMasked”String!
شبا — the 26-character IBAN: IR, two check digits, then the 22-digit
account number. The check digits are part of the string a merchant is given
and a validator that omits them refuses every real account.
Masked on read: it is enough, with a name, to attempt a transfer.
bankName
Section titled “bankName”String
No description.
accountHolder
Section titled “accountHolder”String
The name on the account, as the bank holds it.
holderVerification
Section titled “holderVerification”VerificationState!
Whether the account holder’s name matches the merchant’s legal identity.
Checked against the business profile, not merely stored. A settlement account in somebody else’s name is the commonest shape of a takeover, and the commonest shape of an honest mistake.
isDefault
Section titled “isDefault”Boolean!
No description.
createdAt
Section titled “createdAt”DateTime!
No description.
BankAccountInput
Section titled “BankAccountInput”A settlement account.
String!
شبا — IR, two check digits, then 22 digits: 26 characters. Validated mod 97.
accountHolder
Section titled “accountHolder”String!
No description.
BankAccountPayload
Section titled “BankAccountPayload”What the bank-account mutations return.
bankAccount
Section titled “bankAccount”BankAccount
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
CommissionRefundPolicy
Section titled “CommissionRefundPolicy”What becomes of Kaladan’s commission when a sale is refunded.
Every value is defensible and they are not equivalent — a merchant refunding ten per cent of their sales cares about this line more than about the rate itself, and a merchant who discovers the answer at the first refund will discover it as a grievance.
| Value | Meaning |
|---|---|
RETURNED | Kaladan returns its share. The merchant is made whole. Cleanest to explain and the most expensive to run: the platform has already been settled and has to move money back out. |
NETTED | Kaladan keeps the cash and credits the merchant against future commission. Kaladan’s standard terms. No money moves, which is the point: clawing back a settled تسهیم share means an outbound transfer Kaladan has to initiate, per refund, on rails where that is slow and manual. Netting costs the merchant nothing unless they stop selling, at which point the credit strands — which is why unusedRefundCredit is readable and why a closing shop is told about it. Refund.commissionAdjustment makes each credit visible rather than a surprise. |
KEPT | Kaladan keeps its share; the merchant bears it. Defensible — the platform did the work of taking the payment — and the one most likely to be read as unfair, so a merchant on these terms must be able to see the line on every refund. That is why commissionAdjustment is recorded even when it is zero to the merchant’s benefit. |
CommissionTerms
Section titled “CommissionTerms”What Kaladan takes per sale, in PLATFORM mode.
percent
Section titled “percent”Float!
As a fraction: 0.01 for one per cent.
Money
The most that can be taken from one sale, if capped.
minimum
Section titled “minimum”Money
The least, if there is a floor.
beneficiaryAccount
Section titled “beneficiaryAccount”BankAccount!
Where Kaladan’s share settles.
effectiveFrom
Section titled “effectiveFrom”DateTime!
No description.
commissionOnRefund
Section titled “commissionOnRefund”CommissionRefundPolicy!
What happens to Kaladan’s share when the sale is refunded.
Why it has to be stated. In PLATFORM mode Shaparak settles a sale in
two directions at once — the merchant’s share to their شبا, Kaladan’s
commission to Kaladan’s — and money never rests anywhere it could simply be
clawed back from. When the buyer is owed everything back, somebody has to
say whose money returns.
Kaladan’s standard terms are NETTED. It is per-merchant because it will
differ by plan and by negotiation, but a merchant who is not told otherwise is
on netting.
unusedRefundCredit
Section titled “unusedRefundCredit”Money!
Commission credited by past refunds and not yet consumed, under NETTED.
Always zero under the other two policies. Surfaced because a credit a merchant cannot see is a credit they do not believe in — and because a merchant winding down needs to know what will strand when they stop selling.
Discrepancy
Section titled “Discrepancy”One thing the platform and the provider disagree about.
ID!
No description.
ReconciliationRun!
No description.
DiscrepancyKind!
No description.
transaction
Section titled “transaction”Transaction
The platform’s record, when there is one.
providerRecord
Section titled “providerRecord”JSON
The provider’s record, as they reported it.
Free-form because every provider’s report has a different shape, and normalizing it would lose the fields a merchant needs to quote back.
amount
Section titled “amount”Money
No description.
status
Section titled “status”DiscrepancyResolutionStatus!
No description.
resolution
Section titled “resolution”DiscrepancyResolution
What was done about it.
resolvedBy
Section titled “resolvedBy”AuditActor
No description.
resolvedAt
Section titled “resolvedAt”DateTime
No description.
String
No description.
refund
Section titled “refund”Refund
The refund discrepancyRefund raised: an UNCLAIMED_PAYMENT only.
Present from the moment the refund is asked for, so one still with the
provider — the discrepancy stays INVESTIGATING until the money has gone back
— or one the provider refused is read from the discrepancy it was meant to
close. The latest, when somebody asked again after a refusal. Null after
discrepancyResolve with REFUNDED, which records a refund made outside the
platform and raises none.
detectedAt
Section titled “detectedAt”DateTime!
No description.
DiscrepancyConnection
Section titled “DiscrepancyConnection”A page of discrepancies.
[DiscrepancyEdge!]!
No description.
[Discrepancy!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
How many match the filter, across every page — the same number on page one and on page five. Counted up to 10000: a larger result reads 10000, and a client showing it says “10000 or more”. Test rows are counted only where the list includes them.
DiscrepancyEdge
Section titled “DiscrepancyEdge”One discrepancy, with its cursor.
cursor
Section titled “cursor”String!
No description.
Discrepancy!
No description.
DiscrepancyKind
Section titled “DiscrepancyKind”What kind of disagreement this is.
| Value | Meaning |
|---|---|
MISSING_LOCALLY | The provider took money the platform has no record of. The expensive one. It is a paid order the merchant never saw, and it is what a lost callback plus a failed inquiry produces. Resolving it creates the transaction and the order moves to paid. |
MISSING_AT_PROVIDER | The platform recorded a payment the provider does not report. Usually a transaction marked succeeded on a callback that was never verified — which is why verification is not optional. |
AMOUNT_MISMATCH | Both have it; the amounts differ. |
STATUS_MISMATCH | Both have it; one says paid and the other does not. |
DUPLICATE_CAPTURE | The provider reports two captures for one authority. A double charge. |
REFUND_MISMATCH | A refund both sides hold and disagree about: payouts took more out for it than it gave back. Names the refund’s own transaction. |
SPLIT_MISMATCH | A split settled to an amount or a beneficiary that was not requested. |
UNCLAIMED_PAYMENT | A paid attempt nobody wrote a sale for. The checkout said a sale would claim the payment, the money arrived, and no sale ever did — usually a placement that failed after the buyer paid. The provider and the platform agree completely, so this is not a report to take to the provider: what is missing is the order. Resolving it is writing the sale down, or refunding the buyer: through the provider that took the money with discrepancyRefund, or outside the platform and recorded with discrepancyResolve as REFUNDED. |
ATTRIBUTION_MISMATCH | The checkout the money was attributed to and the one the sale names disagree. Whether a commission was due is then a question about a client rather than about a payment, and it is not settled in favour of either: the money has already moved on one of them. |
CLAIMED_AFTER_REFUND | A sale claimed a payment after it had been given back. An UNCLAIMED_PAYMENT was refunded through its provider and the sale it was for arrived afterwards — a buyer’s late return, a placement retried. The sale is bound to the payment all the same and the refund is given the sale, so the order reads paid and refunded, which is true. This is raised so that somebody looks before goods nobody has been paid for are sent: cancel the order, or collect the money again. |
UNKNOWN_REFUND_DEDUCTION | A provider took money out of a payout for a refund that matches none this shop gave back through that provider. Counted in the payout’s refunds all the same — the money is gone from the transfer, and the payout adds up only with it. Ask the provider what it was, quoting providerRecord. Names no transaction: there is none here. |
REFUND_NOT_DEDUCTED | A refund given back through a provider that no payout has taken out, a week after it went back. The buyer has the money and the merchant’s settlement has not yet shown it leaving, so a payout will be smaller than expected when it does — or the provider has lost it. amount is what is still to come out. Names the refund’s own transaction. |
DiscrepancyPayload
Section titled “DiscrepancyPayload”What the reconciliation mutations return.
discrepancy
Section titled “discrepancy”Discrepancy
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
DiscrepancyRefundInput
Section titled “DiscrepancyRefundInput”Why an unclaimed payment is being given back.
String!
Required: the refund’s note, and the discrepancy’s once the money has gone back. Money is never sent back without saying why.
DiscrepancyResolution
Section titled “DiscrepancyResolution”What was done about a discrepancy.
| Value | Meaning |
|---|---|
RECORD_CORRECTED | The platform’s record was created or corrected from the provider’s. |
ORDER_SETTLED | The order was marked paid and released. |
REFUNDED | The buyer was refunded — a double charge, usually. Given to discrepancyResolve, a refund made outside the platform — by hand, by bank transfer — on every kind, an UNCLAIMED_PAYMENT included: it is recorded, and no money moves. An unclaimed payment given back through its provider by discrepancyRefund is closed with this resolution too, once the provider says the money went back. |
PROVIDER_DISPUTE | Raised with the provider; awaiting their answer. |
IMMATERIAL | Below the write-off threshold. |
OTHER | No description. |
DiscrepancyResolutionStatus
Section titled “DiscrepancyResolutionStatus”Where a discrepancy stands.
| Value | Meaning |
|---|---|
OPEN | No description. |
INVESTIGATING | A person is looking at it. |
RESOLVED | No description. |
WRITTEN_OFF | Judged not worth chasing — a rounding difference under the threshold. |
DiscrepancyResolveInput
Section titled “DiscrepancyResolveInput”How a discrepancy was settled.
resolution
Section titled “resolution”DiscrepancyResolution!
No description.
String!
No description.
ManualReceipt
Section titled “ManualReceipt”A buyer’s claim to have transferred money — رسید کارت به کارت.
ID!
No description.
Order!
No description.
Image
The photo the buyer uploaded — فیش واریزی.
referenceNumber
Section titled “referenceNumber”String
The transfer reference the buyer typed.
claimedAmount
Section titled “claimedAmount”Money!
What the buyer says they sent.
claimedTransferredAt
Section titled “claimedTransferredAt”DateTime
When the buyer says they sent it.
payerCardLast4
Section titled “payerCardLast4”String
The last four of the card they say they sent from.
status
Section titled “status”ReceiptStatus!
No description.
verification
Section titled “verification”ReceiptVerification!
How it was checked, and what was found.
transaction
Section titled “transaction”Transaction
The transaction created when it was approved. Null until then.
reviewedBy
Section titled “reviewedBy”StaffMember
No description.
reviewedAt
Section titled “reviewedAt”DateTime
No description.
rejectionReason
Section titled “rejectionReason”ReceiptRejectionReason
Why it was rejected. The buyer is told this, so it has to be usable.
submittedAt
Section titled “submittedAt”DateTime!
No description.
ManualReceiptConnection
Section titled “ManualReceiptConnection”A page of receipts.
[ManualReceiptEdge!]!
No description.
[ManualReceipt!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
How many match the filter, across every page — the same number on page one and on page five. Counted up to 10000: a larger result reads 10000, and a client showing it says “10000 or more”. Test rows are counted only where the list includes them.
ManualReceiptEdge
Section titled “ManualReceiptEdge”One receipt, with its cursor.
cursor
Section titled “cursor”String!
No description.
ManualReceipt!
No description.
ManualReceiptPayload
Section titled “ManualReceiptPayload”What the receipt mutations return.
receipt
Section titled “receipt”ManualReceipt
No description.
Order
No description.
transaction
Section titled “transaction”Transaction
The transaction created on approval. Null on a rejection.
userErrors
Section titled “userErrors”[UserError!]!
No description.
ManualTransferTarget
Section titled “ManualTransferTarget”The account a card-to-card buyer transfers to.
cardNumberMasked
Section titled “cardNumberMasked”String!
The card number shown to the buyer, masked in this response.
ibanMasked
Section titled “ibanMasked”String
The شبا, for a buyer transferring by IBAN instead.
accountHolder
Section titled “accountHolder”String!
No description.
bankName
Section titled “bankName”String
No description.
ManualTransferTargetInput
Section titled “ManualTransferTargetInput”The account a card-to-card buyer transfers to.
cardNumber
Section titled “cardNumber”String
No description.
String
No description.
accountHolder
Section titled “accountHolder”String!
No description.
bankName
Section titled “bankName”String
No description.
PaymentConfiguration
Section titled “PaymentConfiguration”How this merchant gets paid.
One of two modes, chosen by the merchant and changeable. The distinction is not a setting — it decides whose terminal the money moves through, who is named as a beneficiary, and whether Kaladan takes anything at all.
PaymentMode!
No description.
terminals
Section titled “terminals”[PaymentTerminal!]!
The gateway terminals this shop has, of both modes — each says which in
mode.
PLATFORM terminals belong to Kaladan’s facilitator relationship.
OWN_GATEWAY terminals are ones the merchant registered, and Kaladan holds no
credential of its own for them. A payment goes through a terminal of the
shop’s current mode and no other: a merchant’s own terminal registered and
verified for a switch waits until the switch completes, and once it has, the
old mode’s terminals take no new payment.
settlementAccount
Section titled “settlementAccount”BankAccount
Where the merchant’s share settles — their شبا.
Required in both modes. In PLATFORM mode it is a beneficiary on every split;
in OWN_GATEWAY mode it is what their own PSP already settles to, recorded
here so payouts can be reconciled against it.
commission
Section titled “commission”CommissionTerms
What Kaladan takes per sale. Null in OWN_GATEWAY mode, where it takes
nothing.
methods
Section titled “methods”[PaymentMethodConfiguration!]!
Which methods the merchant offers, and on what terms.
pendingModeSwitch
Section titled “pendingModeSwitch”PaymentModeSwitch
A pending change of mode, if one is in flight.
Switching is an operation with its own state rather than a toggle: the new
terminal has to be verified, and until it is, the old one must keep working.
Null when none is: once a switch completes, mode is the one it asked for,
and once it is cancelled, mode is what it was.
PaymentConfigurationPayload
Section titled “PaymentConfigurationPayload”What the payment-configuration mutations return.
paymentConfiguration
Section titled “paymentConfiguration”PaymentConfiguration
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
PaymentMethodConfiguration
Section titled “PaymentMethodConfiguration”How one payment method is offered.
method
Section titled “method”PaymentMethodType!
No description.
enabled
Section titled “enabled”Boolean!
No description.
surcharge
Section titled “surcharge”Money
What choosing it adds for the buyer — a cash-on-delivery charge, or a gateway fee passed to the payer rather than absorbed.
minimumAmount
Section titled “minimumAmount”Money
Limits, where the method or the merchant sets them.
maximumAmount
Section titled “maximumAmount”Money
No description.
availableProvinceCodes
Section titled “availableProvinceCodes”[String!]!
Provinces this method is offered in. Empty means everywhere.
Cash on delivery is the reason: couriers will not collect cash everywhere, and offering it where it cannot be honoured produces an order the merchant has to cancel.
manualTransferTarget
Section titled “manualTransferTarget”ManualTransferTarget
Where a card-to-card buyer is told to transfer.
Only for CARD_TO_CARD, and null otherwise.
PaymentMethodConfigurationInput
Section titled “PaymentMethodConfigurationInput”How a payment method is offered.
method
Section titled “method”PaymentMethodType!
No description.
enabled
Section titled “enabled”Boolean
No description.
surcharge
Section titled “surcharge”MoneyInput
No description.
minimumAmount
Section titled “minimumAmount”MoneyInput
No description.
maximumAmount
Section titled “maximumAmount”MoneyInput
No description.
availableProvinceCodes
Section titled “availableProvinceCodes”[String!]
Empty means everywhere. Set it for cash on delivery.
manualTransferTarget
Section titled “manualTransferTarget”ManualTransferTargetInput
No description.
PaymentMode
Section titled “PaymentMode”Whose terminal the money moves through.
Neither mode lets Kaladan hold merchant funds. In PLATFORM mode both
parties are named as beneficiaries at payment time and Shaparak performs the
split at settlement — تسهیم. Money never lands in a Kaladan account and is never
redistributed from one. Collect-hold-remit is fund aggregation outside a
Shaparak-approved account, which is prohibited outright.
| Value | Meaning |
|---|---|
PLATFORM | Kaladan’s licensed facilitator relationship. The merchant needs no gateway contract of their own, and frequently no e-Namad. Kaladan is a beneficiary on each split. |
OWN_GATEWAY | The merchant’s own terminal. Everything settles to them and Kaladan takes nothing per sale — but still runs verification and reconciliation, which is the answer to “why route through you at all”. |
PaymentModeSwitch
Section titled “PaymentModeSwitch”A change of payment mode, in flight.
It completes on its own once blockers is empty — when the new mode’s
terminal is verified, or the last payment the old mode left unresolved is — and
from that instant every new payment is the new mode’s: in OWN_GATEWAY no
Kaladan beneficiary and no commission, in PLATFORM the commission in force.
Until then the old mode’s terminals keep taking payments, and what is in flight
on them finishes on them.
PaymentMode!
No description.
PaymentMode!
No description.
status
Section titled “status”PaymentModeSwitchStatus!
AWAITING_MERCHANT or AWAITING_VERIFICATION while pending, read from blockers.
requestedAt
Section titled “requestedAt”DateTime!
No description.
requestedBy
Section titled “requestedBy”StaffMember
No description.
blockers
Section titled “blockers”[PaymentModeSwitchBlocker!]!
What still has to happen before it can complete.
unresolvedTransactions
Section titled “unresolvedTransactions”Int!
How many payments through the old mode’s terminals still need resolving —
what UNRESOLVED_TRANSACTIONS waits on. The needsResolution transactions.
PaymentModeSwitchBlocker
Section titled “PaymentModeSwitchBlocker”What is stopping a mode switch.
| Value | Meaning |
|---|---|
TERMINAL_MISSING | No terminal registered for the target mode. |
TERMINAL_UNVERIFIED | The terminal is registered but the provider has not confirmed it. |
SETTLEMENT_ACCOUNT_UNVERIFIED | No settlement account, or its holder does not match the business profile. |
BUSINESS_PROFILE_INCOMPLETE | The business profile lacks something the target mode requires. |
UNRESOLVED_TRANSACTIONS | Money is still in flight on the old terminal. A switch cannot complete while a transaction is unresolved, because resolving it needs the terminal it was made on. unresolvedTransactions says how many. |
SPLIT_PARTNERS | The shop names split partners, and a payment through its own gateway names nobody: they would go unpaid. Remove them first, deliberately. Raised for a switch to OWN_GATEWAY only. |
COMMISSION_TERMS_MISSING | Kaladan has recorded no commission terms for this shop’s plan, and in PLATFORM mode a sale through hosted checkout is refused without them. Raised for a switch to PLATFORM only, and Kaladan’s to clear. |
PaymentModeSwitchStatus
Section titled “PaymentModeSwitchStatus”Where a mode switch has got to.
| Value | Meaning |
|---|---|
AWAITING_MERCHANT | Waiting on the merchant to supply something: a terminal, a key, an account. |
AWAITING_VERIFICATION | Waiting on a provider or on Kaladan — an unresolved payment, commission terms. |
COMPLETED | Done. The old terminal stops taking new payments; in-flight ones finish on it. Never on pendingModeSwitch, which is null once a switch is done. |
CANCELLED | Withdrawn by paymentModeSwitchCancel. Never on pendingModeSwitch. |
REJECTED | Refused by Kaladan. Nothing refuses one today. |
PaymentProvider
Section titled “PaymentProvider”A provider this build can charge through, and what a terminal there needs and can do — read off the adapter that speaks to it.
String!
What a terminal names it by — zarinpal, sandbox. PaymentTerminalInput.provider takes this.
String!
Its display name.
takesKey
Section titled “takesKey”Boolean!
Whether a terminal there is registered with a key, beside its merchant id. ZarinPal’s payment API, for one, authenticates by the merchant id alone, and takes none.
supportsSplit
Section titled “supportsSplit”Boolean!
Whether it does تسهیم, which a terminal in PLATFORM mode needs.
supportsRefund
Section titled “supportsRefund”Boolean!
Whether it gives money back through its own API at all.
supportsInstantSettlement
Section titled “supportsInstantSettlement”Boolean!
No description.
PaymentTerminal
Section titled “PaymentTerminal”One gateway terminal a shop can charge through.
ID!
No description.
provider
Section titled “provider”String!
The facilitator or PSP, by its PaymentProvider.key — zarinpal, sandbox.
paymentProviders lists the ones this deployment can charge through.
providerName
Section titled “providerName”String!
The provider’s display name, for an admin screen.
terminalIdMasked
Section titled “terminalIdMasked”String!
The merchant id the provider issued — کد پذیرنده / merchant_id.
Masked on read. A terminal id is not a secret in the way a key is, but it is enough to impersonate a merchant to some providers’ support desks.
PaymentMode!
The mode it charges in. A merchant registers OWN_GATEWAY terminals;
PLATFORM ones are Kaladan’s. See PaymentConfiguration.terminals.
status
Section titled “status”PaymentTerminalStatus!
No description.
hasKey
Section titled “hasKey”Boolean!
Whether a key is on file for it. A provider that takes no key —
PaymentProvider.takesKey — has none. The key itself is never returned.
supportedMethods
Section titled “supportedMethods”[PaymentMethodType!]!
Which methods this terminal can carry.
supportsSplit
Section titled “supportsSplit”Boolean!
Whether the provider supports تسهیم on this terminal.
supportsRefund
Section titled “supportsRefund”Boolean!
Whether refunds can be issued through the provider’s API at all.
supportsInstantSettlement
Section titled “supportsInstantSettlement”Boolean!
Whether same-day settlement — تسویه آنی — is available.
isPrimary
Section titled “isPrimary”Boolean!
Whether this is the terminal new payments use, for any method —
primaryFor says which.
Exactly one terminal per method is primary, in each mode. The others are fallbacks, tried in order when the primary is not answering — which matters more here than elsewhere, because a single PSP being down for an hour is ordinary.
primaryFor
Section titled “primaryFor”[PaymentMethodType!]!
The methods it is primary for. A terminal carrying two methods can be primary for one and a fallback for the other.
fallbackOrder
Section titled “fallbackOrder”Int
Its place in its mode’s fallback sequence, from 1. Null for a terminal primary for every method it carries, and for one switched off.
coolingUntil
Section titled “coolingUntil”DateTime
When the cool-down it is in ends: set exactly when status is
UNAVAILABLE, null otherwise. Its provider failed to start a payment three
times in a row, so checkout tries it after the shop’s other terminals until
then, and in its place again afterwards — nothing switches it off, and the
merchant is told once in the inbox.
verifiedAt
Section titled “verifiedAt”DateTime
When its provider last accepted its credential.
lastError
Section titled “lastError”String
Why the provider refused or revoked it, in their own words — what support will quote. Null once a check passes.
createdAt
Section titled “createdAt”DateTime!
No description.
PaymentTerminalInput
Section titled “PaymentTerminalInput”A terminal the merchant is registering — always OWN_GATEWAY: it is the
merchant’s own, whatever mode the shop is in today.
provider
Section titled “provider”String!
A PaymentProvider.key. NOT_FOUND for one this build does not speak.
terminalId
Section titled “terminalId”String!
The merchant id the provider issued — ZarinPal’s 36-character merchant_id.
apiKey
Section titled “apiKey”String
The provider’s API key or secret, for a provider that takes one
(PaymentProvider.takesKey): REQUIRED there, and INCONSISTENT for one that
takes none.
Write-only: no field on this API returns it, and nothing here keeps it. It is
filed with the platform’s secret holder, encrypted, under a reference only
the payment service reads it by, at the moment of each call it authorizes. A
merchant who loses it re-enters it with paymentTerminalKeySet.
supportedMethods
Section titled “supportedMethods”[PaymentMethodType!]
No description.
isPrimary
Section titled “isPrimary”Boolean
Make it primary for every method it carries, if its provider accepts it when
it is registered. One its provider refuses is primary for nothing; once a
check passes it takes any primary its mode has none for, and
paymentTerminalSetPrimary makes it primary for the rest.
PaymentTerminalPayload
Section titled “PaymentTerminalPayload”What the terminal mutations return.
terminal
Section titled “terminal”PaymentTerminal
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
PaymentTerminalStatus
Section titled “PaymentTerminalStatus”Where a terminal stands.
| Value | Meaning |
|---|---|
PENDING_VERIFICATION | Registered, or holding a credential its provider has not accepted — lastError says why, in the provider’s words. Carries no payment. |
ACTIVE | Its provider accepted its credential. With UNAVAILABLE, the only status that carries a payment. |
UNAVAILABLE | Active, and cooling down until coolingUntil: its provider failed to start a payment several times in a row, so payments try the shop’s other terminals first and this one after them. It is back in its place by itself when the cool-down ends, and may still be made primary, placed, checked or switched off as an active one. |
DISABLED | Switched off by the merchant. |
REVOKED | The provider revoked it. Needs the merchant’s attention, not a retry. |
ReceiptDecisionInput
Section titled “ReceiptDecisionInput”How a receipt was judged.
amount
Section titled “amount”MoneyInput
The amount actually credited, when it differs from what the buyer claimed.
String
No description.
rejectionReason
Section titled “rejectionReason”ReceiptRejectionReason
Required on a rejection; the buyer is told it.
notifyCustomer
Section titled “notifyCustomer”Boolean
No description.
ReceiptRejectionReason
Section titled “ReceiptRejectionReason”Why a receipt was refused.
| Value | Meaning |
|---|---|
NOT_FOUND | No transfer matching it could be found. |
AMOUNT_MISMATCH | A transfer was found, for a different amount. |
ILLEGIBLE | The image is not a receipt, or cannot be read. |
DUPLICATE | The same receipt was already used on another order. |
WRONG_DESTINATION | The transfer went somewhere that is not the merchant’s account. |
OTHER | No description. |
ReceiptVerification
Section titled “ReceiptVerification”How a receipt was checked.
method
Section titled “method”ReceiptVerificationMethod!
No description.
matchConfidence
Section titled “matchConfidence”Float
What an automated check found, when one ran.
Null when the check is manual, which is the norm today.
matchedReference
Section titled “matchedReference”String
What the automated check matched against, when it matched something.
checkedAt
Section titled “checkedAt”DateTime
No description.
ReceiptVerificationMethod
Section titled “ReceiptVerificationMethod”How a receipt is checked.
| Value | Meaning |
|---|---|
MANUAL | A person looked at the photo. The norm, and the fraud-prone one. |
AUTOMATED | Matched against the merchant’s own bank feed. |
ASSISTED | An automated check ran and was inconclusive; a person decided. |
ReconciliationRun
Section titled “ReconciliationRun”One day’s comparison of the platform’s records against a provider’s.
ID!
No description.
businessDate
Section titled “businessDate”String!
The day being reconciled, in the shop’s timezone.
provider
Section titled “provider”String!
Which provider’s report this is against.
status
Section titled “status”ReconciliationStatus!
No description.
transactionsChecked
Section titled “transactionsChecked”Int!
No description.
discrepanciesFound
Section titled “discrepanciesFound”Int!
No description.
discrepanciesResolved
Section titled “discrepanciesResolved”Int!
No description.
platformTotal
Section titled “platformTotal”Money!
What the platform thinks it took that day.
providerTotal
Section titled “providerTotal”Money!
What the provider’s report says. The two agreeing is the point.
variance
Section titled “variance”Money!
The gap. Zero on a clean run.
discrepancies
Section titled “discrepancies”DiscrepancyConnection!
No description.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
startedAt
Section titled “startedAt”DateTime!
No description.
completedAt
Section titled “completedAt”DateTime
No description.
failureReason
Section titled “failureReason”String
Why the run itself failed — usually the provider’s report was not available.
ReconciliationRunConnection
Section titled “ReconciliationRunConnection”A page of reconciliation runs.
[ReconciliationRunEdge!]!
No description.
[ReconciliationRun!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
ReconciliationRunEdge
Section titled “ReconciliationRunEdge”One run, with its cursor.
cursor
Section titled “cursor”String!
No description.
ReconciliationRun!
No description.
ReconciliationStatus
Section titled “ReconciliationStatus”Where a reconciliation run got to.
| Value | Meaning |
|---|---|
PENDING | No description. |
RUNNING | No description. |
BALANCED | Finished with no discrepancies. |
UNBALANCED | Finished with discrepancies outstanding. |
RESOLVED | Finished; every discrepancy has been resolved. |
FAILED | Could not run. The provider’s report was missing or unreadable. |
SplitBeneficiary
Section titled “SplitBeneficiary”Somebody named to receive part of a payment.
ID!
Stable for as long as the beneficiary stays on the list. A
splitBeneficiariesSet naming it by this id keeps it — the same id
afterwards, and its شبا unless a new one is given — and only a write that
leaves it out removes it.
On a SplitExecution the beneficiary is a copy made at request time, and its
id names that copy rather than anybody on the standing list: sending it to
splitBeneficiariesSet is NOT_FOUND.
ibanMasked
Section titled “ibanMasked”String!
The شبا it settles to, masked.
Never returned whole, which is why a beneficiary kept by id keeps the شبا on
file rather than being sent it again.
String!
No description.
SplitBeneficiaryRole!
What this beneficiary is — the merchant, Kaladan’s commission, a partner.
description
Section titled “description”String
What the merchant called it, for a split they configured themselves.
SplitShare
What this beneficiary takes out of every sale.
Published so a standing list can be read back and written again without each share being stated from memory.
Null where no standing share applies: a MERCHANT takes the remainder,
PLATFORM takes what the commission terms say, and on a SplitExecution the
beneficiary is a copy made at request time, where SplitExecution.amount is
what actually moved.
SplitBeneficiaryInput
Section titled “SplitBeneficiaryInput”A beneficiary the merchant wants on every split.
The list is replaced whole: one named by id is kept, one without is added,
and one left out is removed.
ID
A beneficiary already on the list, by SplitBeneficiary.id. Kept rather than
replaced: the same id afterwards, and its شبا on file unless iban gives a
new one. Omit it for a new beneficiary.
NOT_FOUND for an id that is not one of this shop’s beneficiaries — removed
since the list was read, or never on it — and INCONSISTENT for one id named
twice in one write.
String
شبا — IR, two check digits, then 22 digits: 26 characters. Validated mod 97.
Required for a new beneficiary (REQUIRED). For one kept by id, omitted,
null or blank keeps the شبا on file — the read publishes it masked, so nobody
can send it back whole — and a value replaces it.
String!
No description.
description
Section titled “description”String
No description.
Float
A fraction of each sale. Supply this or fixedAmount, not both.
fixedAmount
Section titled “fixedAmount”MoneyInput
No description.
SplitBeneficiaryRole
Section titled “SplitBeneficiaryRole”What a split beneficiary is.
| Value | Meaning |
|---|---|
MERCHANT | The merchant’s own share. |
PLATFORM | Kaladan’s commission, in PLATFORM mode. |
PARTNER | Somebody the merchant added — a supplier, a partner, a marketplace seller. |
SplitExecution
Section titled “SplitExecution”One beneficiary’s share of one transaction — تسهیم.
beneficiary
Section titled “beneficiary”SplitBeneficiary!
Who received it.
amount
Section titled “amount”Money!
No description.
status
Section titled “status”SplitStatus!
No description.
settledAt
Section titled “settledAt”DateTime
When Shaparak settled this share.
SplitShare
Section titled “SplitShare”What a beneficiary takes out of each sale — a fraction of it, or a flat amount.
One of the two is set and the other is null, which kind says without a client
having to test for it. The same pair, in the same order, is what
SplitBeneficiaryInput takes.
SplitShareKind!
Which of the two below carries the share.
Float
A fraction of what is left after the platform’s share. 0.1 is a tenth.
Null when kind is FIXED_AMOUNT. A fraction and not a percentage, as
CommissionTerms.percent and BuyXGetY.getDiscountPercentage are.
fixedAmount
Section titled “fixedAmount”Money
A flat amount out of every sale. Null when kind is RATIO.
SplitShareKind
Section titled “SplitShareKind”How a beneficiary’s share is expressed.
| Value | Meaning |
|---|---|
RATIO | A fraction of each sale — ratio carries it. |
FIXED_AMOUNT | A flat amount per sale — fixedAmount carries it. |
SplitStatus
Section titled “SplitStatus”Where one share of a split stands.
| Value | Meaning |
|---|---|
PENDING | Named on the request; Shaparak has not settled yet. |
SETTLED | No description. |
FAILED | The provider rejected this beneficiary — usually a bad or closed شبا. |
Transaction
Section titled “Transaction”One attempt to move money, and everything needed to find out what happened to it.
Richer than the OrderPayment that Order.payments lists: that is the fact,
this is the record. A merchant looking at a payment that went wrong needs the
authority token, the verification attempts, and the gateway’s own words.
ID!
No description.
Order
No description.
TransactionKind!
No description.
status
Section titled “status”TransactionStatus!
No description.
method
Section titled “method”PaymentMethodType!
No description.
amount
Section titled “amount”Money!
No description.
terminal
Section titled “terminal”PaymentTerminal
The terminal it went through. Null for cash and manual transfers.
gatewayName
Section titled “gatewayName”String
No description.
authority
Section titled “authority”String
The gateway’s own handle for this attempt — authority, token, refId.
What a verify or inquiry call is made with, and what the provider’s support desk asks for. Kept even on a failed attempt, because a failure that later turns out to have taken money is found by this.
referenceNumber
Section titled “referenceNumber”String
The gateway’s reference number — شماره پیگیری.
retrievalReferenceNumber
Section titled “retrievalReferenceNumber”String
The card network’s retrieval reference — شماره مرجع / RRN.
cardMask
Section titled “cardMask”String
No description.
cardIssuer
Section titled “cardIssuer”String
The issuing bank, derived from the card’s BIN.
splits
Section titled “splits”[SplitExecution!]!
How the split was executed, when there was one.
Empty in OWN_GATEWAY mode and on any method that does not split.
verificationAttempts
Section titled “verificationAttempts”Int!
How many times the platform has tried to verify or inquire.
Visible because a merchant chasing a stuck payment deserves to see that the platform is still trying, rather than being told nothing.
lastVerificationAt
Section titled “lastVerificationAt”DateTime
No description.
lastVerificationError
Section titled “lastVerificationError”String
The gateway’s own error, untranslated. It is what support will quote.
parentTransaction
Section titled “parentTransaction”Transaction
The transaction this reverses, for a refund or a void.
Boolean!
Whether this was made in test mode.
requestedAt
Section titled “requestedAt”DateTime!
No description.
callbackAt
Section titled “callbackAt”DateTime
When the buyer came back from the gateway, if they did.
verifiedAt
Section titled “verifiedAt”DateTime
When the platform confirmed it with the gateway. The only time that counts.
TransactionConnection
Section titled “TransactionConnection”A page of transactions.
[TransactionEdge!]!
No description.
[Transaction!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
How many match the filter, across every page — the same number on page one and on page five. Counted up to 10000: a larger result reads 10000, and a client showing it says “10000 or more”. Test rows are counted only where the list includes them.
totalAmount
Section titled “totalAmount”Money!
What these transactions add up to, across every page.
TransactionEdge
Section titled “TransactionEdge”One transaction, with its cursor.
cursor
Section titled “cursor”String!
No description.
Transaction!
No description.
TransactionFilter
Section titled “TransactionFilter”A filter on the transaction list.
status
Section titled “status”[TransactionStatus!]
No description.
[TransactionKind!]
No description.
method
Section titled “method”[PaymentMethodType!]
No description.
provider
Section titled “provider”String
No description.
orderId
Section titled “orderId”ID
No description.
requestedAfter
Section titled “requestedAfter”DateTime
No description.
requestedBefore
Section titled “requestedBefore”DateTime
No description.
needsResolution
Section titled “needsResolution”Boolean
Transactions the reconciliation worker has not settled.
The queue that matters: UNRESOLVED, and anything stuck in VERIFYING or
CALLBACK_RECEIVED past its window.
includeTest
Section titled “includeTest”Boolean
No description.
TransactionKind
Section titled “TransactionKind”What a transaction is doing.
| Value | Meaning |
|---|---|
SALE | A charge, authorized and captured in one step. The Iranian default. |
AUTHORIZATION | A hold without a capture. Rare here; few providers support it. |
CAPTURE | Taking a previously authorized amount. |
VOID | Releasing an authorization without taking it. |
REFUND | Giving money back. |
CASH_COLLECTION | Cash handed to a courier, recorded when the courier settles. |
MANUAL_TRANSFER | A card-to-card transfer, recorded when its receipt is approved. |
TransactionPayload
Section titled “TransactionPayload”What the transaction mutations return.
transaction
Section titled “transaction”Transaction
No description.
Order
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
TransactionStatus
Section titled “TransactionStatus”Where an attempt stands.
Two values matter most: SUCCEEDED, the only one that means paid, and
UNRESOLVED, which is never a failure. Telling them apart is what this record
is for.
| Value | Meaning |
|---|---|
INITIATED | Created; the buyer has not been sent to the gateway yet. |
REDIRECTED | The buyer is at the gateway. Nothing is known. |
CALLBACK_RECEIVED | The buyer came back. The platform has not yet asked the gateway. |
VERIFYING | A verify call is in flight. |
SUCCEEDED | Verified with the gateway. The only status that means paid. |
FAILED | The gateway said no, or the buyer abandoned it. |
CANCELLED | Cancelled before anything moved. |
UNRESOLVED | Money is believed to have moved and the gateway has not confirmed which way — تراکنش نامشخص. The state a lost callback produces. The reconciliation worker owns it: it polls the gateway’s inquiry endpoint until it becomes SUCCEEDED or FAILED. An admin must never present this as failure. A merchant who refunds an unresolved transaction refunds money they may never have received, and a buyer told their payment failed pays twice. |