{"components":{"schemas":{"AcceptedInvitation":{"$id":"#/components/schemas/AcceptedInvitation","properties":{"membershipId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"role":{"$ref":"#/components/schemas/InvitableRole"}},"required":["merchantId","membershipId","role"],"type":"object"},"AdminBankPolicy":{"$id":"#/components/schemas/AdminBankPolicy","properties":{"bankCode":{"type":"string"},"configured":{"description":"Whether a policy row exists.","type":"boolean"},"evidenceNote":{"type":["string","null"]},"parser":{"properties":{"depositRuleCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"ruleCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"ruleIds":{"items":{"type":"string"},"type":"array"},"withdrawalRuleCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["ruleCount","depositRuleCount","withdrawalRuleCount","ruleIds"],"type":"object"},"pilotMerchantIds":{"anyOf":[{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},{"type":"null"}],"description":"pilot only: null = every merchant."},"status":{"description":"verified (default) when no policy row exists (owner decision 2026-10-20): safely matched live deposits confirm automatically. experimental sends every live deposit of the bank to review; pilot limits automatic confirmation to the listed merchants.","enum":["experimental","pilot","verified"],"type":"string"},"updatedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"updatedBy":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]}},"required":["bankCode","status","configured","pilotMerchantIds","evidenceNote","updatedBy","updatedAt","parser"],"type":"object"},"AdminBankPolicyChange":{"$id":"#/components/schemas/AdminBankPolicyChange","properties":{"actorId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"actorType":{"enum":["user","system","cli"],"type":"string"},"bankCode":{"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"newStatus":{"enum":["experimental","pilot","verified"],"type":"string"},"oldStatus":{"anyOf":[{"enum":["experimental","pilot","verified"],"type":"string"},{"type":"null"}]},"pilotMerchantIds":{"anyOf":[{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},{"type":"null"}]},"reason":{"type":"string"}},"required":["id","bankCode","oldStatus","newStatus","pilotMerchantIds","reason","actorType","actorId","createdAt"],"type":"object"},"AdminBankPolicyChangePage":{"$id":"#/components/schemas/AdminBankPolicyChangePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminBankPolicyChange"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminBankPolicyList":{"$id":"#/components/schemas/AdminBankPolicyList","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminBankPolicy"},"type":"array"},"parserVersion":{"type":"string"}},"required":["parserVersion","data"],"type":"object"},"AdminBillingStatus":{"$id":"#/components/schemas/AdminBillingStatus","properties":{"activeDestinations":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"activeDevices":{"description":"Paired relay devices (informational; any supported evidence path can confirm).","maximum":9007199254740991,"minimum":0,"type":"integer"},"activePlans":{"description":"Active, non-example plans merchants can see.","maximum":9007199254740991,"minimum":0,"type":"integer"},"billingMerchantId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Managed setting PLATFORM_BILLING_MERCHANT_ID."},"merchantName":{"type":["string","null"]},"merchantStatus":{"anyOf":[{"enum":["active","suspended","closed"],"type":"string"},{"type":"null"}]},"problems":{"items":{"$ref":"#/components/schemas/BillingProblem"},"type":"array"},"ready":{"description":"Merchants can buy plans online (no problems).","type":"boolean"},"zeroFee":{"description":"The billing merchant has an active zero_fee entitlement (plan invoices never charge service credit).","type":"boolean"}},"required":["ready","problems","billingMerchantId","merchantName","merchantStatus","zeroFee","activeDestinations","activeDevices","activePlans"],"type":"object"},"AdminCountComparison":{"$id":"#/components/schemas/AdminCountComparison","properties":{"changePercent":{"description":"Change versus the previous equal interval, in percent (one decimal). null when the previous value is zero or negative (undefined), never Infinity or an invented 0.","type":["number","null"]},"current":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"previous":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["current","previous","changePercent"],"type":"object"},"AdminDeposit":{"$id":"#/components/schemas/AdminDeposit","properties":{"accountMask":{"type":["string","null"]},"amountRial":{"$ref":"#/components/schemas/AmountRial"},"assurance":{"type":"string"},"bankCode":{"type":["string","null"]},"cardMask":{"type":["string","null"]},"channel":{"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"destinationId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"direction":{"enum":["deposit","withdrawal"],"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"invoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"observedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"parserVersion":{"type":"string"},"reviewReason":{"type":["string","null"]},"status":{"enum":["unmatched","matched","review","ignored","duplicate"],"type":"string"}},"required":["id","merchantId","status","reviewReason","assurance","channel","bankCode","direction","amountRial","cardMask","accountMask","destinationId","invoiceId","parserVersion","observedAt","createdAt"],"type":"object"},"AdminDepositDecision":{"$id":"#/components/schemas/AdminDepositDecision","properties":{"deposit":{"$ref":"#/components/schemas/AdminDeposit"},"invoice":{"anyOf":[{"$ref":"#/components/schemas/AdminInvoice"},{"type":"null"}],"description":"The confirmed invoice (confirm), or null (reject)."}},"required":["deposit","invoice"],"type":"object"},"AdminDepositDecisionRequest":{"$id":"#/components/schemas/AdminDepositDecisionRequest","oneOf":[{"properties":{"action":{"const":"confirm","type":"string"},"invoiceId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["action","invoiceId","reason"],"type":"object"},{"properties":{"action":{"const":"reject","type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["action","reason"],"type":"object"}]},"AdminDepositPage":{"$id":"#/components/schemas/AdminDepositPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminDeposit"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminDevice":{"$id":"#/components/schemas/AdminDevice","properties":{"appVersion":{"type":["string","null"]},"channels":{"description":"relay_sms only when the merchant enabled SMS fallback on the device.","items":{"enum":["relay_https","relay_sms"],"type":"string"},"type":"array"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"health":{"enum":["healthy","degraded","offline","never_seen","revoked"],"type":"string"},"heartbeatAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastSeenAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"name":{"type":"string"},"osVersion":{"type":["string","null"]},"queueDepth":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"status":{"enum":["active","revoked"],"type":"string"}},"required":["id","merchantId","merchantName","shortId","name","status","health","appVersion","osVersion","channels","lastSeenAt","heartbeatAgeSeconds","queueDepth","createdAt","revokedAt"],"type":"object"},"AdminDevicePage":{"$id":"#/components/schemas/AdminDevicePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminDevice"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminGrantCode":{"$id":"#/components/schemas/AdminGrantCode","properties":{"amountOffRial":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"codeLast4":{"type":"string"},"conditions":{"$ref":"#/components/schemas/GrantConditions"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"durationDays":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"issuerType":{"enum":["admin","partner"],"type":"string"},"issuerUserId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"kind":{"$ref":"#/components/schemas/GrantCodeKind"},"maxRedemptions":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"note":{"type":["string","null"]},"partnerId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"partnerName":{"type":["string","null"]},"partnerReference":{"type":["string","null"]},"percentOff":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"planCode":{"type":["string","null"]},"redemptions":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"revokedReason":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/GrantCodeStatus"}},"required":["id","codeLast4","kind","planCode","durationDays","percentOff","amountOffRial","maxRedemptions","redemptions","status","expiresAt","revokedAt","revokedReason","issuerType","partnerId","partnerName","issuerUserId","partnerReference","note","conditions","createdAt"],"type":"object"},"AdminGrantCodeCreated":{"$id":"#/components/schemas/AdminGrantCodeCreated","properties":{"code":{"description":"The code, shown once.","type":"string"},"grantCode":{"$ref":"#/components/schemas/AdminGrantCode"}},"required":["grantCode","code"],"type":"object"},"AdminGrantCodePage":{"$id":"#/components/schemas/AdminGrantCodePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminGrantCode"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminInvoice":{"$id":"#/components/schemas/AdminInvoice","properties":{"bankCode":{"type":"string"},"baseAmountRial":{"$ref":"#/components/schemas/AmountRial"},"confirmationKind":{"anyOf":[{"enum":["auto","manual"],"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"customerFeeRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"destinationCardMask":{"type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"feeSource":{"enum":["credit","quota","entitlement","grant"],"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantFeeRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"offsetRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"orderRef":{"type":["string","null"]},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"payableAmountRial":{"$ref":"#/components/schemas/AmountRial"},"publicId":{"type":"string"},"status":{"$ref":"#/components/schemas/InvoiceStatus"}},"required":["id","publicId","merchantId","merchantName","status","baseAmountRial","customerFeeRial","offsetRial","payableAmountRial","merchantFeeRial","feeSource","destinationCardMask","bankCode","confirmationKind","orderRef","createdAt","expiresAt","paidAt"],"type":"object"},"AdminInvoicePage":{"$id":"#/components/schemas/AdminInvoicePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminInvoice"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminLedgerEntry":{"$id":"#/components/schemas/AdminLedgerEntry","properties":{"accountKind":{"enum":["merchant_available","merchant_reserved","platform_revenue","platform_promotions","platform_topup_clearing","platform_adjustments"],"type":"string"},"actorId":{"type":["string","null"]},"actorType":{"enum":["user","system","admin","api_key"],"type":"string"},"amountRial":{"$ref":"#/components/schemas/AmountRial"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"externalReference":{"type":["string","null"]},"id":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"invoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"merchantId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"reason":{"type":"string"},"side":{"enum":["debit","credit"],"type":"string"},"transactionId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"transactionKind":{"enum":["topup","grant","fee_reserve","fee_charge","fee_release","adjustment"],"type":"string"}},"required":["id","transactionId","transactionKind","merchantId","accountKind","side","amountRial","reason","actorType","actorId","invoiceId","externalReference","createdAt"],"type":"object"},"AdminLedgerEntryPage":{"$id":"#/components/schemas/AdminLedgerEntryPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminLedgerEntry"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminLedgerTotals":{"$id":"#/components/schemas/AdminLedgerTotals","properties":{"adjustmentsNetRial":{"$ref":"#/components/schemas/RialString","description":"Debit-normal: positive = net credit granted to merchants by adjustments."},"balanced":{"description":"True when total debits equal total credits across all postings.","type":"boolean"},"creditsRial":{"$ref":"#/components/schemas/RialString"},"debitsRial":{"$ref":"#/components/schemas/RialString"},"merchantAvailableRial":{"$ref":"#/components/schemas/RialString"},"merchantReservedRial":{"$ref":"#/components/schemas/RialString"},"platformRevenueRial":{"$ref":"#/components/schemas/RialString","description":"Service charges earned (all time)."},"promotionsIssuedRial":{"$ref":"#/components/schemas/RialString"},"topupClearingRial":{"$ref":"#/components/schemas/RialString"}},"required":["merchantAvailableRial","merchantReservedRial","platformRevenueRial","promotionsIssuedRial","topupClearingRial","adjustmentsNetRial","debitsRial","creditsRial","balanced"],"type":"object"},"AdminMe":{"$id":"#/components/schemas/AdminMe","properties":{"displayName":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"role":{"$ref":"#/components/schemas/PlatformRole"},"stepUp":{"properties":{"authenticatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fresh":{"type":"boolean"},"freshUntil":{"description":"Step-up commands are accepted until this instant; afterwards sign in again.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["authenticatedAt","freshUntil","fresh"],"type":"object"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName","role","permissions","stepUp"],"type":"object"},"AdminMerchant":{"$id":"#/components/schemas/AdminMerchant","properties":{"availableRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"memberCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"ownerDisplayName":{"type":["string","null"]},"ownerUserId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"status":{"enum":["active","suspended","closed"],"type":"string"}},"required":["id","name","status","ownerUserId","ownerDisplayName","memberCount","availableRial","reservedRial","createdAt"],"type":"object"},"AdminMerchantBalance":{"$id":"#/components/schemas/AdminMerchantBalance","properties":{"availableRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["merchantId","merchantName","availableRial","reservedRial"],"type":"object"},"AdminMerchantBalancePage":{"$id":"#/components/schemas/AdminMerchantBalancePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminMerchantBalance"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminMerchantDetail":{"$id":"#/components/schemas/AdminMerchantDetail","properties":{"apiKeys":{"items":{"properties":{"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastUsedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"name":{"type":"string"},"prefix":{"type":"string"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]}},"required":["id","prefix","name","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"credit":{"properties":{"availableRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["availableRial","reservedRial"],"type":"object"},"destinations":{"items":{"properties":{"bankCode":{"type":"string"},"cardMask":{"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"label":{"type":"string"},"status":{"enum":["active","paused","suspended","archived"],"type":"string"}},"required":["id","label","cardMask","bankCode","status"],"type":"object"},"type":"array"},"devices":{"items":{"$ref":"#/components/schemas/AdminDevice"},"type":"array"},"members":{"items":{"properties":{"displayName":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"status":{"enum":["active","detached"],"type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName","role","status"],"type":"object"},"type":"array"},"merchant":{"$ref":"#/components/schemas/AdminMerchant"},"recentInvoices":{"items":{"$ref":"#/components/schemas/AdminInvoice"},"type":"array"},"webhookEndpoints":{"items":{"properties":{"consecutiveFailures":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"deadDeliveries":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"origin":{"description":"Scheme + host only; paths and query strings are never shown.","type":"string"},"pendingDeliveries":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"status":{"enum":["active","disabled"],"type":"string"}},"required":["id","origin","status","consecutiveFailures","pendingDeliveries","deadDeliveries"],"type":"object"},"type":"array"}},"required":["merchant","members","destinations","credit","recentInvoices","devices","apiKeys","webhookEndpoints"],"type":"object"},"AdminMerchantGrant":{"$id":"#/components/schemas/AdminMerchantGrant","properties":{"codeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"codeLast4":{"type":"string"},"conditions":{"$ref":"#/components/schemas/MerchantGrantConditions"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"features":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"issuer":{"enum":["admin","partner"],"type":"string"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"partnerName":{"type":["string","null"]},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"periodStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"planCode":{"type":"string"},"planNameFa":{"type":"string"},"redeemedVia":{"enum":["api_key","session"],"type":"string"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"revokedReason":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/MerchantGrantStatus"},"usedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","codeLast4","planCode","planNameFa","features","includedConfirmations","usedConfirmations","periodStart","periodEnd","status","issuer","partnerName","conditions","redeemedVia","createdAt","revokedAt","merchantId","merchantName","codeId","revokedReason"],"type":"object"},"AdminMerchantGrantPage":{"$id":"#/components/schemas/AdminMerchantGrantPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminMerchantGrant"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminMerchantModeration":{"$id":"#/components/schemas/AdminMerchantModeration","properties":{"effects":{"description":"Human-readable consequences of the change.","items":{"type":"string"},"type":"array"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"previousStatus":{"enum":["active","suspended","closed"],"type":"string"},"status":{"enum":["active","suspended","closed"],"type":"string"}},"required":["merchantId","previousStatus","status","effects"],"type":"object"},"AdminMerchantPage":{"$id":"#/components/schemas/AdminMerchantPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminMerchant"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminOperationalHealth":{"$id":"#/components/schemas/AdminOperationalHealth","properties":{"checkedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"database":{"properties":{"latencyMs":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"ok":{"type":"boolean"}},"required":["ok","latencyMs"],"type":"object"},"dicex":{"properties":{"lines":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxCheckpointAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Age in seconds of the oldest item; null when there is none."},"maxConsecutiveFailures":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxLastSuccessAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Age in seconds of the oldest item; null when there is none."},"pollEnabled":{"type":"boolean"}},"required":["pollEnabled","lines","maxCheckpointAgeSeconds","maxLastSuccessAgeSeconds","maxConsecutiveFailures"],"type":"object"},"ingestion":{"properties":{"awaitingProcessing":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"failed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"oldestAwaitingAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Age in seconds of the oldest item; null when there is none."},"quarantinedLast24h":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["awaitingProcessing","failed","quarantinedLast24h","oldestAwaitingAgeSeconds"],"type":"object"},"outbox":{"properties":{"byTopic":{"items":{"properties":{"dead":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"pending":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"topic":{"type":"string"}},"required":["topic","pending","dead"],"type":"object"},"type":"array"},"dead":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"oldestPendingAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Age in seconds of the oldest item; null when there is none."},"overdue":{"description":"Pending jobs due more than 5 minutes ago (worker not keeping up).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"pending":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"processing":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"retrying":{"description":"Pending jobs that already failed at least once.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stalledLeases":{"description":"Processing jobs whose lease expired (worker crashed or stalled); they are reclaimed automatically.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["pending","retrying","processing","stalledLeases","dead","overdue","oldestPendingAgeSeconds","byTopic"],"type":"object"},"reviewQueue":{"description":"Live deposits waiting for a human decision.","properties":{"review":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"unmatched":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["review","unmatched"],"type":"object"},"webhooks":{"properties":{"dead":{"description":"Dead-lettered deliveries (retries exhausted).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"failed":{"description":"Failed at least once and scheduled for retry.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"oldestDueAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Age in seconds of the oldest item; null when there is none."},"pending":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["pending","failed","dead","oldestDueAgeSeconds"],"type":"object"}},"required":["checkedAt","database","outbox","webhooks","ingestion","reviewQueue","dicex"],"type":"object"},"AdminOverview":{"$id":"#/components/schemas/AdminOverview","properties":{"invoices":{"properties":{"cancelled":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"createdTotal":{"description":"Cohort: invoices CREATED inside the range, by current status.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"expired":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"open":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"paid":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"review":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["createdTotal","open","paid","review","expired","cancelled"],"type":"object"},"merchants":{"properties":{"active":{"description":"Merchants with at least one invoice (selected mode) created inside the range.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"new":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"suspended":{"description":"Currently suspended (snapshot, not range-bound).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"total":{"description":"Merchants created before the range end.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["total","new","active","suspended"],"type":"object"},"platform":{"properties":{"earnedFeesRial":{"$ref":"#/components/schemas/RialString","description":"Net service charges credited to the platform_revenue ledger account inside the range."}},"required":["earnedFeesRial"],"type":"object"},"range":{"properties":{"endUtc":{"description":"Exclusive end.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fromDay":{"type":"string"},"startUtc":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"timezone":{"const":"Asia/Tehran (UTC+03:30)","type":"string"},"toDay":{"type":"string"}},"required":["fromDay","toDay","startUtc","endUtc","timezone"],"type":"object"},"sales":{"properties":{"autoConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"baseSalesRial":{"$ref":"#/components/schemas/RialString","description":"Merchants' base sales. Money went directly to merchants; NOT PAYNYX revenue."},"customerFeesRial":{"$ref":"#/components/schemas/RialString"},"customerPaidRial":{"$ref":"#/components/schemas/RialString"},"manualConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"offsetsRial":{"$ref":"#/components/schemas/RialString"},"successfulCount":{"description":"Cohort: invoices PAID inside the range (by paidAt).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["successfulCount","baseSalesRial","customerPaidRial","customerFeesRial","offsetsRial","autoConfirmations","manualConfirmations"],"type":"object"},"series":{"items":{"properties":{"baseSalesRial":{"$ref":"#/components/schemas/RialString"},"day":{"type":"string"},"earnedFeesRial":{"$ref":"#/components/schemas/RialString"},"newMerchants":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["day","successfulCount","baseSalesRial","earnedFeesRial","newMerchants"],"type":"object"},"type":"array"},"serviceCredit":{"properties":{"availableRial":{"$ref":"#/components/schemas/RialString","description":"Snapshot of all merchants’ available service credit (a liability, not sales and not withdrawable money)."},"reservedRial":{"$ref":"#/components/schemas/RialString","description":"Snapshot of credit reserved for pending invoices."}},"required":["availableRial","reservedRial"],"type":"object"},"users":{"properties":{"active":{"description":"Non-staff users with a session overlapping the range (created before its end, last seen at or after its start).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"new":{"description":"Non-staff users created inside the range.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"total":{"description":"Non-staff users created before the range end.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["total","new","active"],"type":"object"}},"required":["range","users","merchants","invoices","sales","platform","serviceCredit","series"],"type":"object"},"AdminOverviewAnalytics":{"$id":"#/components/schemas/AdminOverviewAnalytics","properties":{"byBank":{"description":"Paid invoices grouped by the destination card's bank.","items":{"properties":{"bankCode":{"type":"string"},"baseSalesRial":{"$ref":"#/components/schemas/RialString"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["bankCode","successfulCount","baseSalesRial"],"type":"object"},"type":"array"},"byChannel":{"description":"Paid invoices grouped by the evidence channel of the matched deposit (relay_https, relay_sms, forwarder, sms_forward, manual; unknown when no deposit is linked).","items":{"properties":{"baseSalesRial":{"$ref":"#/components/schemas/RialString"},"channel":{"type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["channel","successfulCount","baseSalesRial"],"type":"object"},"type":"array"},"comparison":{"properties":{"baseSalesRial":{"$ref":"#/components/schemas/AdminRialComparison","description":"Merchants' base sales of invoices paid inside the interval. Not PAYNYX revenue."},"earnedFeesRial":{"$ref":"#/components/schemas/AdminRialComparison","description":"Net platform_revenue postings inside the interval ."},"invoicesCreated":{"$ref":"#/components/schemas/AdminCountComparison","description":"Invoices created inside the interval (by createdAt)."},"newMerchants":{"$ref":"#/components/schemas/AdminCountComparison"},"successfulCount":{"$ref":"#/components/schemas/AdminCountComparison","description":"Invoices paid inside the interval (by paidAt)."}},"required":["successfulCount","baseSalesRial","earnedFeesRial","invoicesCreated","newMerchants"],"type":"object"},"confirmation":{"description":"Denominator: invoices paid inside the interval with a recorded confirmation kind (open, expired or review invoices are not part of it).","properties":{"auto":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"autoShare":{"description":"auto / denominator (0..1, four decimals); null when the denominator is 0.","type":["number","null"]},"denominator":{"description":"auto + manual: invoices paid inside the interval that carry a confirmation kind.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"manual":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"manualShare":{"type":["number","null"]}},"required":["auto","manual","denominator","autoShare","manualShare"],"type":"object"},"latency":{"description":"Seconds from the matched deposit observedAt to invoice paidAt for invoices paid inside the interval (negative skews clamp to 0). Manual includes human review time.","properties":{"all":{"properties":{"p50Seconds":{"type":["number","null"]},"p90Seconds":{"type":["number","null"]},"sampleSize":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["sampleSize","p50Seconds","p90Seconds"],"type":"object"},"auto":{"properties":{"p50Seconds":{"type":["number","null"]},"p90Seconds":{"type":["number","null"]},"sampleSize":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["sampleSize","p50Seconds","p90Seconds"],"type":"object"},"manual":{"properties":{"p50Seconds":{"type":["number","null"]},"p90Seconds":{"type":["number","null"]},"sampleSize":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["sampleSize","p50Seconds","p90Seconds"],"type":"object"}},"required":["all","auto","manual"],"type":"object"},"range":{"properties":{"endUtc":{"description":"Exclusive end.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fromDay":{"type":"string"},"previous":{"description":"The previous interval of equal length that ends where the selected one starts.","properties":{"endUtc":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fromDay":{"type":"string"},"startUtc":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"toDay":{"type":"string"}},"required":["fromDay","toDay","startUtc","endUtc"],"type":"object"},"startUtc":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"timezone":{"const":"Asia/Tehran (UTC+03:30)","type":"string"},"toDay":{"type":"string"}},"required":["fromDay","toDay","startUtc","endUtc","timezone","previous"],"type":"object"},"topMerchants":{"properties":{"byCount":{"description":"Ranked by number of invoices paid inside the interval; ties by base sales then id.","items":{"properties":{"baseSalesRial":{"$ref":"#/components/schemas/RialString"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["merchantId","merchantName","successfulCount","baseSalesRial"],"type":"object"},"type":"array"},"bySales":{"description":"Ranked by base sales of invoices paid inside the interval; ties by count then id.","items":{"properties":{"baseSalesRial":{"$ref":"#/components/schemas/RialString"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["merchantId","merchantName","successfulCount","baseSalesRial"],"type":"object"},"type":"array"}},"required":["bySales","byCount"],"type":"object"}},"required":["range","comparison","topMerchants","byBank","byChannel","confirmation","latency"],"type":"object"},"AdminPartner":{"$id":"#/components/schemas/AdminPartner","properties":{"codesIssued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"disabledAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"ipAllowlist":{"items":{"type":"string"},"type":"array"},"keyId":{"description":"Public key id (X-Paynyx-Partner). Never the secret.","type":"string"},"lastUsedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"name":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"Until then the previous secret is still accepted (rotation grace period)."},"scopes":{"items":{"$ref":"#/components/schemas/PartnerScope"},"type":"array"},"secretRotatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"status":{"enum":["active","disabled"],"type":"string"},"updatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","name","status","keyId","ipAllowlist","scopes","codesIssued","createdAt","updatedAt","secretRotatedAt","previousSecretExpiresAt","lastUsedAt","disabledAt"],"type":"object"},"AdminPartnerList":{"$id":"#/components/schemas/AdminPartnerList","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminPartner"},"type":"array"}},"required":["data"],"type":"object"},"AdminPartnerSecret":{"$id":"#/components/schemas/AdminPartnerSecret","properties":{"partner":{"$ref":"#/components/schemas/AdminPartner"},"secret":{"description":"HMAC secret, shown once. Store it encrypted on the partner server.","type":"string"}},"required":["partner","secret"],"type":"object"},"AdminPlan":{"$id":"#/components/schemas/AdminPlan","properties":{"active":{"type":"boolean"},"code":{"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"currentSubscribers":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},"feePolicyId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Fee policy for confirmations beyond the included count; null = the platform default policy at invoice time."},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"isExample":{"description":"Example/sample plans are never shown to merchants or sold.","type":"boolean"},"kind":{"enum":["usage","subscription"],"type":"string"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"nameFa":{"type":"string"},"needsReview":{"description":"Suggested by the seed (migration 0020) and never edited by the owner: review price and features before activating.","type":"boolean"},"origin":{"enum":["admin","seed"],"type":"string"},"paidPurchases":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"pendingPurchases":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"periodDays":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"priceRial":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"updatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","code","nameFa","kind","priceRial","includedConfirmations","periodDays","active","isExample","origin","needsReview","features","maxActiveLinks","maxDestinations","feePolicyId","currentSubscribers","paidPurchases","pendingPurchases","createdAt","updatedAt"],"type":"object"},"AdminPlanList":{"$id":"#/components/schemas/AdminPlanList","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminPlan"},"type":"array"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureInfo"},"type":"array"}},"required":["data","features"],"type":"object"},"AdminPlanPurchase":{"$id":"#/components/schemas/AdminPlanPurchase","properties":{"billingInvoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Invoice of the billing merchant (visible in that merchant's own invoice list); null for paymentMethod discount."},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"discountRial":{"description":"Discount from a percent_off / amount_off code (floor of the percentage), integer rial.","maximum":9007199254740991,"minimum":0,"type":"integer"},"endedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"listPriceRial":{"description":"Plan price at purchase time, before any discount code.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"paymentMethod":{"description":"invoice = paid card-to-card through a billing invoice; discount = fully covered by a 100 % discount code (no invoice).","enum":["invoice","discount"],"type":"string"},"periodDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"planCode":{"type":"string"},"planId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"planNameFa":{"type":"string"},"priceRial":{"description":"Amount actually charged: listPriceRial - discountRial (0 for a 100 % discount).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"status":{"$ref":"#/components/schemas/PlanPurchaseStatus"},"subscriptionId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]}},"required":["id","planId","planCode","planNameFa","priceRial","listPriceRial","discountRial","paymentMethod","includedConfirmations","periodDays","features","maxActiveLinks","maxDestinations","status","createdAt","paidAt","endedAt","merchantId","merchantName","billingInvoiceId","subscriptionId"],"type":"object"},"AdminPlanPurchasePage":{"$id":"#/components/schemas/AdminPlanPurchasePage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminPlanPurchase"},"type":"array"},"nextCursor":{"type":["string","null"]},"paidCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"paidTotalRial":{"description":"Exact sum of paid purchase prices (rial, decimal string). PAYNYX plan revenue, not merchant sales and not service credit.","pattern":"^[0-9]{1,24}$","type":"string"}},"required":["data","nextCursor","paidCount","paidTotalRial"],"type":"object"},"AdminReasonRequest":{"$id":"#/components/schemas/AdminReasonRequest","properties":{"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"AdminRecoveryDecision":{"$id":"#/components/schemas/AdminRecoveryDecision","properties":{"effects":{"properties":{"holdUntil":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"When the 72 h cooling-off on both accounts ends (approve only)."},"numberTransferred":{"type":"boolean"},"sessionsRevoked":{"description":"Sessions revoked on both accounts.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"supersededRequests":{"description":"Other pending requests for the same number that were closed automatically.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["numberTransferred","sessionsRevoked","holdUntil","supersededRequests"],"type":"object"},"request":{"$ref":"#/components/schemas/AdminRecoveryRequest"}},"required":["request","effects"],"type":"object"},"AdminRecoveryDecisionRequest":{"$id":"#/components/schemas/AdminRecoveryDecisionRequest","properties":{"decision":{"enum":["approve","deny"],"type":"string"},"reason":{"description":"What was verified (e.g. how the claimant proved ownership). Stored in the audit log.","maxLength":500,"minLength":10,"type":"string"}},"required":["decision","reason"],"type":"object"},"AdminRecoveryRequest":{"$id":"#/components/schemas/AdminRecoveryRequest","properties":{"claimant":{"description":"The account that verified the number by OTP and asks to own it.","properties":{"activeSessions":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"hasTelegramIdentity":{"type":"boolean"},"holdUntil":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"End of the 72 h cooling-off, when one is running."},"merchantCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"phoneMasked":{"description":"The account's verified number, masked (0912 *** 0001); null when it has none.","type":["string","null"]},"platformRole":{"anyOf":[{"$ref":"#/components/schemas/PlatformRole"},{"type":"null"}],"description":"Active platform staff role. An account with a role cannot lose its number through this flow."},"status":{"enum":["active","suspended"],"type":"string"},"telegramUsername":{"type":["string","null"]},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName","status","createdAt","telegramUsername","phoneMasked","hasTelegramIdentity","merchantCount","activeSessions","platformRole","holdUntil"],"type":"object"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"existing":{"description":"The account that currently owns the number.","properties":{"activeSessions":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"hasTelegramIdentity":{"type":"boolean"},"holdUntil":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"End of the 72 h cooling-off, when one is running."},"merchantCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"phoneMasked":{"description":"The account's verified number, masked (0912 *** 0001); null when it has none.","type":["string","null"]},"platformRole":{"anyOf":[{"$ref":"#/components/schemas/PlatformRole"},{"type":"null"}],"description":"Active platform staff role. An account with a role cannot lose its number through this flow."},"status":{"enum":["active","suspended"],"type":"string"},"telegramUsername":{"type":["string","null"]},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName","status","createdAt","telegramUsername","phoneMasked","hasTelegramIdentity","merchantCount","activeSessions","platformRole","holdUntil"],"type":"object"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"const":"phone_conflict","type":"string"},"phoneMasked":{"description":"The contested number, masked. The full number is never returned.","type":"string"},"resolutionNote":{"type":["string","null"]},"resolvedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"resolvedBy":{"anyOf":[{"properties":{"displayName":{"type":["string","null"]},"userId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"via":{"enum":["console","cli"],"type":"string"}},"required":["userId","displayName","via"],"type":"object"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/RecoveryRequestStatus"}},"required":["id","kind","status","phoneMasked","createdAt","resolvedAt","resolvedBy","resolutionNote","claimant","existing"],"type":"object"},"AdminRecoveryRequestPage":{"$id":"#/components/schemas/AdminRecoveryRequestPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminRecoveryRequest"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminRialComparison":{"$id":"#/components/schemas/AdminRialComparison","properties":{"changePercent":{"description":"Change versus the previous equal interval, in percent (one decimal). null when the previous value is zero or negative (undefined), never Infinity or an invented 0.","type":["number","null"]},"current":{"$ref":"#/components/schemas/RialString"},"previous":{"$ref":"#/components/schemas/RialString"}},"required":["current","previous","changePercent"],"type":"object"},"AdminUser":{"$id":"#/components/schemas/AdminUser","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"platformRole":{"anyOf":[{"$ref":"#/components/schemas/PlatformRole"},{"type":"null"}]},"status":{"enum":["active","suspended"],"type":"string"},"telegramIdMasked":{"type":["string","null"]},"telegramUsername":{"type":["string","null"]}},"required":["id","displayName","status","telegramUsername","telegramIdMasked","platformRole","merchantCount","createdAt"],"type":"object"},"AdminUserDetail":{"$id":"#/components/schemas/AdminUserDetail","properties":{"lastLoginAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"memberships":{"items":{"properties":{"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"status":{"enum":["active","detached"],"type":"string"}},"required":["merchantId","merchantName","role","status"],"type":"object"},"type":"array"},"platformStaffStatus":{"anyOf":[{"enum":["active","suspended"],"type":"string"},{"type":"null"}]},"sessions":{"properties":{"activeMiniApp":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"activeWeb":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"lastSeenAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]}},"required":["activeWeb","activeMiniApp","lastSeenAt"],"type":"object"},"user":{"$ref":"#/components/schemas/AdminUser"}},"required":["user","platformStaffStatus","memberships","sessions","lastLoginAt"],"type":"object"},"AdminUserPage":{"$id":"#/components/schemas/AdminUserPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminUser"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AdminWebhookDelivery":{"$id":"#/components/schemas/AdminWebhookDelivery","properties":{"attemptCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"endpointId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"endpointOrigin":{"type":"string"},"eventCreatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"eventId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"eventType":{"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastAttemptAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"lastError":{"description":"Sanitised: truncated, URLs reduced to their origin.","type":["string","null"]},"lastStatusCode":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"nextAttemptAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"status":{"enum":["pending","succeeded","failed","dead"],"type":"string"}},"required":["id","eventId","eventType","merchantId","endpointId","endpointOrigin","status","attemptCount","nextAttemptAt","lastAttemptAt","lastStatusCode","lastError","eventCreatedAt"],"type":"object"},"AdminWebhookDeliveryPage":{"$id":"#/components/schemas/AdminWebhookDeliveryPage","properties":{"data":{"items":{"$ref":"#/components/schemas/AdminWebhookDelivery"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"AmountRial":{"$id":"#/components/schemas/AmountRial","description":"Integer amount in IRR rial (never toman).","examples":[1250000],"maximum":1000000000000,"minimum":1,"type":"integer"},"AndroidChallenge":{"$id":"#/components/schemas/AndroidChallenge","properties":{"botDeepLink":{"type":"string"},"challengeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"displayCode":{"description":"Six digits shown in the app; the bot shows the same code.","type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["challengeId","displayCode","botDeepLink","expiresAt"],"type":"object"},"AndroidChallengeRequest":{"$id":"#/components/schemas/AndroidChallengeRequest","properties":{"codeChallenge":{"description":"BASE64URL(SHA-256(codeVerifier)), RFC 7636 S256.","pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"codeChallengeMethod":{"const":"S256","type":"string"},"deviceLabel":{"description":"Shown in the bot so the user recognises the phone. Letters, digits, space and . _ ( ) + - only (no line breaks or bidi controls).","pattern":"^[\\p{L}\\p{N} ._()+-]{1,40}$","type":"string"},"installationId":{"description":"Random per-installation UUID kept in app-private storage (not a hardware id).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"publicKey":{"description":"Keystore ECDSA P-256 public key, SPKI DER, base64.","pattern":"^[A-Za-z0-9+/=]{80,200}$","type":"string"}},"required":["installationId","publicKey","codeChallenge","codeChallengeMethod","deviceLabel"],"type":"object"},"AndroidHandoffRequest":{"$id":"#/components/schemas/AndroidHandoffRequest","properties":{"installationId":{"description":"Random per-installation UUID kept in app-private storage (not a hardware id).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"signature":{"description":"Signs: paynyx-android-handoff, installationId, timestampMs, sha256hex(accessToken) joined by \\n.","pattern":"^[A-Za-z0-9+/]{16,200}={0,2}$","type":"string"},"timestampMs":{"description":"Device clock, Unix epoch milliseconds (accepted skew ±300 s).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["installationId","timestampMs","signature"],"type":"object"},"AndroidRedeemRequest":{"$id":"#/components/schemas/AndroidRedeemRequest","properties":{"codeVerifier":{"pattern":"^[A-Za-z0-9._~-]{43,128}$","type":"string"},"installationId":{"description":"Random per-installation UUID kept in app-private storage (not a hardware id).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"signature":{"description":"Signs: paynyx-android-redeem, challengeId, installationId, timestampMs, sha256hex(codeVerifier) joined by \\n.","pattern":"^[A-Za-z0-9+/]{16,200}={0,2}$","type":"string"},"timestampMs":{"description":"Device clock, Unix epoch milliseconds (accepted skew ±300 s).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["codeVerifier","installationId","timestampMs","signature"],"type":"object"},"AndroidRedeemStatus":{"$id":"#/components/schemas/AndroidRedeemStatus","properties":{"grant":{"$ref":"#/components/schemas/AppSessionGrant","description":"approved only, exactly once."},"opened":{"description":"pending only: the Telegram link has been opened.","type":"boolean"},"status":{"enum":["pending","expired","denied","consumed","approved"],"type":"string"}},"required":["status"],"type":"object"},"AndroidRefreshRequest":{"$id":"#/components/schemas/AndroidRefreshRequest","properties":{"installationId":{"description":"Random per-installation UUID kept in app-private storage (not a hardware id).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"refreshToken":{"pattern":"^pr_[A-Za-z0-9_-]{43}$","type":"string"},"signature":{"description":"Signs: paynyx-android-refresh, installationId, timestampMs, sha256hex(refreshToken) joined by \\n.","pattern":"^[A-Za-z0-9+/]{16,200}={0,2}$","type":"string"},"timestampMs":{"description":"Device clock, Unix epoch milliseconds (accepted skew ±300 s).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["refreshToken","installationId","timestampMs","signature"],"type":"object"},"AndroidRelayPairingRequest":{"$id":"#/components/schemas/AndroidRelayPairingRequest","properties":{"appVersion":{"maxLength":40,"type":"string"},"deviceName":{"description":"Phone model; the device name shown in the dashboard.","maxLength":80,"minLength":1,"type":"string"},"installationId":{"description":"Random per-installation UUID kept in app-private storage (not a hardware id).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantId":{"description":"The store to relay for; access is checked against the session (devices.manage), never trusted from the body.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"osVersion":{"maxLength":60,"type":"string"},"signature":{"description":"Signs: paynyx-android-relay-pairing, installationId, timestampMs, merchantId, sha256hex(accessToken) joined by \\n.","pattern":"^[A-Za-z0-9+/]{16,200}={0,2}$","type":"string"},"sims":{"default":[],"items":{"$ref":"#/components/schemas/DeviceSimInfo"},"maxItems":4,"type":"array"},"timestampMs":{"description":"Device clock, Unix epoch milliseconds (accepted skew ±300 s).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["merchantId","installationId","timestampMs","signature","deviceName","appVersion","osVersion"],"type":"object"},"AndroidWebHandoff":{"$id":"#/components/schemas/AndroidWebHandoff","properties":{"code":{"description":"`ph_…`, single use, 60 seconds. POST it as the form field `code` to /v1/auth/app-handoff; never put it in a URL.","type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["code","expiresAt"],"type":"object"},"ApiKey":{"$id":"#/components/schemas/ApiKey","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastUsedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"name":{"type":"string"},"prefix":{"type":"string"},"projectId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Project the key is scoped to (null/absent: unscoped)."},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"scopes":{"items":{"enum":["invoices:write","invoices:read"],"type":"string"},"type":"array"}},"required":["id","name","prefix","scopes","createdAt","lastUsedAt","revokedAt"],"type":"object"},"ApiKeyProjectBinding":{"$id":"#/components/schemas/ApiKeyProjectBinding","properties":{"apiKeyId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"projectId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"null: the key may create invoices for any project of the merchant."}},"required":["apiKeyId","projectId"],"type":"object"},"AppSessionGrant":{"$id":"#/components/schemas/AppSessionGrant","properties":{"accessExpiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"accessToken":{"description":"Bearer `pa_…`, valid 10 minutes, never sliding.","type":"string"},"me":{"$ref":"#/components/schemas/Me"},"refreshExpiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"refreshToken":{"description":"`pr_…`, single use; any second use revokes the whole session family.","type":"string"}},"required":["accessToken","accessExpiresAt","refreshToken","refreshExpiresAt","me"],"type":"object"},"ApprovalMode":{"$id":"#/components/schemas/ApprovalMode","description":"automatic: a unique exact match with sufficient assurance confirms the invoice; anything unsafe goes to review. manual_review: retired for merchants (owner decision 2026-10-20); create/update requests with it are refused (422) and every project was set to automatic. It may still appear on invoices created before the change.","enum":["automatic","manual_review"],"type":"string"},"ApproveBrowserChallengeRequest":{"$id":"#/components/schemas/ApproveBrowserChallengeRequest","properties":{"challengeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"decision":{"enum":["approve","deny"],"type":"string"},"displayCode":{"description":"Code the user typed from their own browser; required to approve. A mismatch denies the challenge.","pattern":"^[0-9]{6}$","type":"string"},"displayName":{"maxLength":200,"minLength":1,"type":"string"},"telegramUserId":{"pattern":"^[0-9]{1,20}$","type":"string"},"telegramUsername":{"maxLength":64,"type":"string"}},"required":["challengeId","telegramUserId","displayName","decision"],"type":"object"},"ArchiveMerchantRequest":{"$id":"#/components/schemas/ArchiveMerchantRequest","properties":{"confirmMerchantName":{"description":"Must equal the merchant name exactly (typed confirmation).","maxLength":120,"minLength":1,"type":"string"}},"required":["confirmMerchantName"],"type":"object"},"ArchivedMerchant":{"$id":"#/components/schemas/ArchivedMerchant","properties":{"archivedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"revoked":{"description":"Credentials and integrations switched off by the archive (counts).","properties":{"apiKeys":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"devicePairings":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"devices":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"forwarderKeys":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"forwardingNumbers":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"invitations":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"webhookEndpoints":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["apiKeys","forwarderKeys","devices","devicePairings","forwardingNumbers","webhookEndpoints","invitations"],"type":"object"},"status":{"const":"closed","type":"string"}},"required":["merchantId","status","archivedAt","revoked"],"type":"object"},"AttachPhoneResult":{"$id":"#/components/schemas/AttachPhoneResult","properties":{"holdUntil":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"Set when replacing an existing number: sensitive actions are held until then."},"phone":{"anyOf":[{"$ref":"#/components/schemas/PhoneSummary"},{"type":"null"}]},"status":{"description":"`review_pending`: the number is already verified on another account. Nothing was moved or merged; a support review was opened.","enum":["verified","review_pending"],"type":"string"}},"required":["status","phone","holdUntil"],"type":"object"},"AuthMethods":{"$id":"#/components/schemas/AuthMethods","description":"Sign-in methods currently enabled. Public; used by the login page.","properties":{"phone":{"type":"boolean"},"telegram":{"type":"boolean"}},"required":["phone","telegram"],"type":"object"},"BillingProblem":{"$id":"#/components/schemas/BillingProblem","enum":["not_configured","merchant_not_found","merchant_inactive","zero_fee_missing","no_active_destination"],"type":"string"},"BindApiKeyProjectRequest":{"$id":"#/components/schemas/BindApiKeyProjectRequest","properties":{"projectId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]}},"required":["projectId"],"type":"object"},"BotDecisionRequest":{"$id":"#/components/schemas/BotDecisionRequest","properties":{"action":{"enum":["approve","reject"],"type":"string"},"channel":{"$ref":"#/components/schemas/MessengerChannel"},"handle":{"description":"Delivery handle from the button (delivery id without dashes).","pattern":"^[0-9a-f]{32}$","type":"string"},"platformUserId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["channel","platformUserId","handle","action"],"type":"object"},"BotDecisionResult":{"$id":"#/components/schemas/BotDecisionResult","properties":{"messageFa":{"description":"Fresh, minimal state text to show in the messenger.","type":"string"},"outcome":{"enum":["applied","already_decided","stale","refused"],"type":"string"},"reason":{"description":"Stable machine reason when not applied.","type":"string"}},"required":["outcome","messageFa"],"type":"object"},"BotLinkLookupRequest":{"$id":"#/components/schemas/BotLinkLookupRequest","properties":{"channel":{"$ref":"#/components/schemas/MessengerChannel"},"platformUserId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["channel","platformUserId"],"type":"object"},"BotLinkLookupResult":{"$id":"#/components/schemas/BotLinkLookupResult","properties":{"linkId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"linked":{"type":"boolean"},"notifyScope":{"$ref":"#/components/schemas/MessengerScopeIds"},"reviewEnabled":{"type":"boolean"}},"required":["linked"],"type":"object"},"BotRuntimeConfig":{"$id":"#/components/schemas/BotRuntimeConfig","properties":{"baleBotToken":{"description":"Effective Bale bot token (managed setting first, environment fallback). Server-to-server only; never logged.","type":["string","null"]},"baleEnabled":{"description":"The API's effective MESSENGER_BALE_ENABLED (managed setting first, environment fallback, applied at API start). The bot starts its Bale adapter only when this is true and a Bale token exists.","type":"boolean"},"telegramBotToken":{"description":"Effective Telegram bot token (managed setting first, environment fallback). Server-to-server only; never logged.","type":["string","null"]},"telegramLinksEnabled":{"description":"The API's effective MESSENGER_TELEGRAM_LINKS_ENABLED (managed setting first, environment fallback, applied at API start). The bot enables /link, /status and /unlink only when this is true.","type":"boolean"}},"required":["telegramBotToken","baleBotToken","telegramLinksEnabled","baleEnabled"],"type":"object"},"BotUnlinkResult":{"$id":"#/components/schemas/BotUnlinkResult","properties":{"status":{"enum":["unlinked","not_linked"],"type":"string"}},"required":["status"],"type":"object"},"BrowserChallenge":{"$id":"#/components/schemas/BrowserChallenge","properties":{"botDeepLink":{"type":"string"},"browserSecret":{"description":"Keep in memory; required to redeem the approved challenge.","type":"string"},"challengeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"displayCode":{"type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["challengeId","browserSecret","displayCode","botDeepLink","expiresAt"],"type":"object"},"BrowserChallengeStatus":{"$id":"#/components/schemas/BrowserChallengeStatus","properties":{"grant":{"$ref":"#/components/schemas/SessionGrant"},"opened":{"description":"While pending: true once the deep link was opened in the PAYNYX Telegram bot (approval is still required there).","type":"boolean"},"status":{"enum":["pending","approved","denied","expired","consumed"],"type":"string"}},"required":["status"],"type":"object"},"ChangeMemberRoleRequest":{"$id":"#/components/schemas/ChangeMemberRoleRequest","properties":{"role":{"$ref":"#/components/schemas/InvitableRole"}},"required":["role"],"type":"object"},"ClearSettingRequest":{"$id":"#/components/schemas/ClearSettingRequest","properties":{"confirmKey":{"maxLength":80,"type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"CreateAdminGrantCodeRequest":{"$id":"#/components/schemas/CreateAdminGrantCodeRequest","additionalProperties":false,"properties":{"amountOffRial":{"description":"amount_off only (required), integer rial.","maximum":1000000000000,"minimum":1,"type":"integer"},"conditions":{"$ref":"#/components/schemas/GrantConditionsInput"},"durationDays":{"description":"plan_grant only (required).","maximum":366,"minimum":1,"type":"integer"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"kind":{"$ref":"#/components/schemas/GrantCodeKind"},"maxRedemptions":{"description":"Default 1. Must be 1 when singleMerchant.","maximum":100000,"minimum":1,"type":"integer"},"note":{"maxLength":500,"type":"string"},"percentOff":{"description":"percent_off only (required).","maximum":100,"minimum":1,"type":"integer"},"planCode":{"description":"Required for plan_grant; for discounts, restricts the code to this plan.","pattern":"^[a-z][a-z0-9_-]{1,39}$","type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["kind","reason"],"type":"object"},"CreateApiKeyRequest":{"$id":"#/components/schemas/CreateApiKeyRequest","properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"scopes":{"items":{"enum":["invoices:write","invoices:read"],"type":"string"},"minItems":1,"type":"array"}},"required":["name","scopes"],"type":"object"},"CreateDestinationRequest":{"$id":"#/components/schemas/CreateDestinationRequest","properties":{"accountNumber":{"pattern":"^[0-9]{6,26}$","type":"string"},"bankCode":{"description":"Derived from the card BIN when omitted.","type":"string"},"cardNumber":{"description":"16-digit card number; Persian digits, spaces and dashes are accepted.","maxLength":24,"minLength":16,"type":"string"},"dailyLimitRial":{"$ref":"#/components/schemas/AmountRial"},"holderName":{"maxLength":120,"minLength":1,"type":"string"},"iban":{"maxLength":40,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"smsAccountHints":{"description":"Account/card fragments as they appear in bank SMS (e.g. \"5678\"), used to resolve the destination.","items":{"pattern":"^[0-9*]{2,26}$","type":"string"},"maxItems":10,"type":"array"},"weight":{"maximum":100,"minimum":1,"type":"integer"}},"required":["label","cardNumber","holderName"],"type":"object"},"CreateDevicePairingRequest":{"$id":"#/components/schemas/CreateDevicePairingRequest","properties":{"destinationIds":{"default":[],"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":20,"type":"array"},"deviceName":{"maxLength":80,"minLength":1,"type":"string"}},"required":["deviceName"],"type":"object"},"CreateForwarderKeyRequest":{"$id":"#/components/schemas/CreateForwarderKeyRequest","properties":{"format":{"$ref":"#/components/schemas/ForwarderFormat"},"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["name","format"],"type":"object"},"CreateInvitationRequest":{"$id":"#/components/schemas/CreateInvitationRequest","properties":{"expiresInHours":{"default":72,"maximum":168,"minimum":1,"type":"integer"},"note":{"description":"Shown to the inviter only (e.g. who it is for).","maxLength":120,"minLength":1,"type":"string"},"role":{"$ref":"#/components/schemas/InvitableRole"},"telegramUserId":{"description":"Optional: restrict acceptance to this numeric Telegram user id.","pattern":"^[0-9]{1,20}$","type":"string"}},"required":["role"],"type":"object"},"CreateInvoiceRequest":{"$id":"#/components/schemas/CreateInvoiceRequest","properties":{"baseAmountRial":{"$ref":"#/components/schemas/AmountRial"},"customerRef":{"maxLength":128,"minLength":1,"type":"string"},"description":{"maxLength":500,"type":"string"},"destinationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"propertyNames":{"maxLength":40,"type":"string"},"type":"object"},"orderRef":{"description":"Your order id. At most one open/review/paid invoice per orderRef and mode: an identical repeat returns that invoice (200), different data is 409 order_ref_conflict, a paid order is 409 order_already_paid. After expiry/cancellation a new attempt (new invoice id) is allowed.","maxLength":128,"minLength":1,"type":"string"},"projectId":{"description":"Project scope (shop/site/bot). Uses the project destinations, routing, default TTL and approval policy. A project-scoped API key always uses its own project.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"returnUrl":{"format":"uri","maxLength":2048,"type":"string"},"ttlSeconds":{"maximum":86400,"minimum":300,"type":"integer"}},"required":["baseAmountRial"],"type":"object"},"CreateMerchantRequest":{"$id":"#/components/schemas/CreateMerchantRequest","properties":{"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"CreateMessengerLinkCodeRequest":{"$id":"#/components/schemas/CreateMessengerLinkCodeRequest","properties":{"channel":{"$ref":"#/components/schemas/MessengerChannel"}},"required":["channel"],"type":"object"},"CreatePartnerGrantCodeRequest":{"$id":"#/components/schemas/CreatePartnerGrantCodeRequest","additionalProperties":false,"properties":{"conditions":{"$ref":"#/components/schemas/PartnerGrantConditionsInput"},"durationDays":{"maximum":366,"minimum":1,"type":"integer"},"expiresAt":{"description":"Redeem before this instant (default: never expires). At most 2 years ahead.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"kind":{"const":"plan_grant","type":"string"},"maxRedemptions":{"const":1,"description":"Partner codes are single use (default 1).","type":"number"},"partnerReference":{"description":"The partner's own reference (e.g. a license number). Never personal data.","pattern":"^[A-Za-z0-9._:/-]{1,64}$","type":"string"},"planCode":{"description":"Plan code (see the admin plan catalog).","pattern":"^[a-z][a-z0-9_-]{1,39}$","type":"string"}},"required":["kind","planCode","durationDays"],"type":"object"},"CreatePartnerRequest":{"$id":"#/components/schemas/CreatePartnerRequest","additionalProperties":false,"properties":{"ipAllowlist":{"items":{"description":"IPv4/IPv6 address or CIDR network (e.g. 203.0.113.0/24, 2001:db8::/32).","examples":["203.0.113.10/32"],"maxLength":49,"minLength":2,"pattern":"^[0-9A-Fa-f:.]+(\\/[0-9]{1,3})?$","type":"string"},"maxItems":20,"minItems":1,"type":"array"},"name":{"maxLength":80,"minLength":1,"type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/PartnerScope"},"maxItems":2,"minItems":1,"type":"array"}},"required":["name","ipAllowlist","reason"],"type":"object"},"CreatePaymentLinkRequest":{"$id":"#/components/schemas/CreatePaymentLinkRequest","properties":{"amountRial":{"$ref":"#/components/schemas/AmountRial","description":"Fixed amount. Exactly one of amountRial or (minAmountRial + maxAmountRial)."},"buyerNoteLabel":{"description":"Must not ask buyers for card numbers, IBAN, passwords/PIN, CVV2 or one-time codes (Persian or English terms); otherwise 422 buyer_note_label_sensitive.","maxLength":80,"minLength":1,"type":"string"},"buyerNoteMode":{"default":"none","enum":["none","optional","required"],"type":"string"},"description":{"maxLength":1000,"type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"maxAmountRial":{"$ref":"#/components/schemas/AmountRial"},"maxUses":{"maximum":1000000,"minimum":1,"type":"integer"},"minAmountRial":{"$ref":"#/components/schemas/AmountRial"},"orderRefPrefix":{"description":"Attempts get orderRef \"<prefix>-<random>\"; omitted → no orderRef.","pattern":"^[A-Za-z0-9_-]{1,32}$","type":"string"},"slug":{"description":"Custom slug; omitted → a random unguessable slug. 409 slug_taken on collision.","pattern":"^[a-z0-9][a-z0-9-]{2,62}$","type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"ttlSeconds":{"maximum":86400,"minimum":300,"type":"integer"}},"required":["title"],"type":"object"},"CreatePlanPurchaseRequest":{"$id":"#/components/schemas/CreatePlanPurchaseRequest","additionalProperties":false,"properties":{"discountCode":{"description":"Optional percent_off / amount_off code; validated and counted once for this purchase.","maxLength":64,"minLength":4,"type":"string"},"planId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["planId"],"type":"object"},"CreatePlanRequest":{"$id":"#/components/schemas/CreatePlanRequest","additionalProperties":false,"properties":{"active":{"default":false,"type":"boolean"},"code":{"description":"Stable lowercase identifier (2-40 chars); cannot be changed after creation.","pattern":"^[a-z][a-z0-9_-]{1,39}$","type":"string"},"features":{"default":[],"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"maxItems":15,"type":"array"},"includedConfirmations":{"maximum":10000000,"minimum":0,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"null = no commercial limit (technical limits still apply)."},"maxDestinations":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"null = no commercial limit (technical limits still apply)."},"nameFa":{"maxLength":60,"minLength":2,"type":"string"},"periodDays":{"maximum":366,"minimum":1,"type":"integer"},"priceRial":{"description":"Plan price in integer rial (toman = rial / 10, display only).","maximum":1000000000000,"minimum":1,"type":"integer"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["code","nameFa","priceRial","includedConfirmations","periodDays","reason"],"type":"object"},"CreateProjectRequest":{"$id":"#/components/schemas/CreateProjectRequest","properties":{"approvalMode":{"$ref":"#/components/schemas/ApprovalMode"},"defaultTtlSeconds":{"anyOf":[{"maximum":86400,"minimum":300,"type":"integer"},{"type":"null"}]},"destinationIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":50,"type":"array"},"fixedDestinationId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Required with routingStrategy = manual, otherwise must be null."},"kind":{"$ref":"#/components/schemas/ProjectKind"},"name":{"maxLength":80,"minLength":1,"type":"string"},"routingStrategy":{"anyOf":[{"$ref":"#/components/schemas/ProjectRoutingStrategy"},{"type":"null"}]}},"required":["name"],"type":"object"},"CreateWebhookEndpointRequest":{"$id":"#/components/schemas/CreateWebhookEndpointRequest","properties":{"description":{"maxLength":200,"type":"string"},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"minItems":1,"type":"array"},"url":{"format":"uri","maxLength":2048,"type":"string"}},"required":["url","eventTypes"],"type":"object"},"CreatedApiKey":{"$id":"#/components/schemas/CreatedApiKey","properties":{"apiKey":{"$ref":"#/components/schemas/ApiKey"},"secret":{"description":"Full key, shown once. Server-side use only.","type":"string"}},"required":["apiKey","secret"],"type":"object"},"CreatedForwarderKey":{"$id":"#/components/schemas/CreatedForwarderKey","properties":{"forwarderKey":{"$ref":"#/components/schemas/ForwarderKey"},"secret":{"description":"Shown once. Sent as `Authorization: Bearer <secret>`; never in a URL. For format `ios-shortcut.v1` this is the iPhone connection code (`pnxi_…`) that the merchant pastes into the PAYNYX Shortcut.","type":"string"}},"required":["forwarderKey","secret"],"type":"object"},"CreatedInvitation":{"$id":"#/components/schemas/CreatedInvitation","properties":{"acceptUrl":{"description":"Web acceptance URL (token in the fragment, never sent to servers in the request line).","format":"uri","type":"string"},"invitation":{"$ref":"#/components/schemas/Invitation"},"telegramStartUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Mini App deep link (startapp=inv_<token>) when a bot username is configured."},"token":{"description":"Single-use invitation secret. Shown ONCE; only its hash is stored. Share it privately.","type":"string"}},"required":["invitation","token","acceptUrl","telegramStartUrl"],"type":"object"},"CreatedWebhookEndpoint":{"$id":"#/components/schemas/CreatedWebhookEndpoint","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"description":"Signing secret (whsec_…), shown once.","type":"string"}},"required":["endpoint","secret"],"type":"object"},"CreditAdjustment":{"$id":"#/components/schemas/CreditAdjustment","properties":{"actorRole":{"$ref":"#/components/schemas/PlatformRole"},"actorUserId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"amountRial":{"$ref":"#/components/schemas/AmountRial"},"approvalPolicy":{"const":"single_actor_step_up","type":"string"},"availableAfterRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"availableBeforeRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"category":{"enum":["correction","goodwill","promotion","compensation"],"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"direction":{"enum":["credit","debit"],"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"ledgerTransactionId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"reason":{"type":"string"},"reference":{"type":["string","null"]},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","merchantId","direction","amountRial","category","reason","reference","ledgerTransactionId","availableBeforeRial","availableAfterRial","reservedRial","actorUserId","actorRole","approvalPolicy","createdAt"],"type":"object"},"CreditAdjustmentPreview":{"$id":"#/components/schemas/CreditAdjustmentPreview","properties":{"allowed":{"type":"boolean"},"amountRial":{"$ref":"#/components/schemas/AmountRial"},"approvalPolicy":{"const":"single_actor_step_up","type":"string"},"availableAfterRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"availableRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"blockingReason":{"anyOf":[{"enum":["insufficient_available_credit"],"type":"string"},{"type":"null"}]},"direction":{"enum":["credit","debit"],"type":"string"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"note":{"type":"string"},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stepUpFresh":{"description":"Whether the caller may submit now without signing in again.","type":"boolean"}},"required":["merchantId","direction","amountRial","availableRial","reservedRial","availableAfterRial","allowed","blockingReason","stepUpFresh","approvalPolicy","note"],"type":"object"},"CreditAdjustmentRequest":{"$id":"#/components/schemas/CreditAdjustmentRequest","properties":{"amountRial":{"$ref":"#/components/schemas/AmountRial"},"category":{"description":"promotion is credit-only and is booked against platform_promotions.","enum":["correction","goodwill","promotion","compensation"],"type":"string"},"direction":{"description":"credit adds service credit to the merchant; debit removes AVAILABLE credit only (reserved credit is never touched).","enum":["credit","debit"],"type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"reference":{"description":"Support case / ticket reference.","maxLength":100,"minLength":1,"type":"string"}},"required":["direction","amountRial","category","reason"],"type":"object"},"CreditBalance":{"$id":"#/components/schemas/CreditBalance","properties":{"availableRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"reservedRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"subscription":{"anyOf":[{"properties":{"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"planCode":{"type":"string"},"usedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["planCode","periodEnd","usedConfirmations","includedConfirmations"],"type":"object"},{"type":"null"}]},"zeroFee":{"type":"boolean"}},"required":["availableRial","reservedRial","zeroFee","subscription"],"type":"object"},"CurrentApiKey":{"$id":"#/components/schemas/CurrentApiKey","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantId":{"description":"Merchant the key belongs to; use it in every /v1/merchants/{merchantId}/… path.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"name":{"type":"string"},"object":{"const":"api_key","type":"string"},"prefix":{"description":"Public key prefix (pk_live_xxxxxxxx). Never the secret.","type":"string"},"scopes":{"items":{"enum":["invoices:write","invoices:read"],"type":"string"},"type":"array"}},"required":["object","id","merchantId","scopes","prefix","name","createdAt","expiresAt"],"type":"object"},"CurrentPlan":{"$id":"#/components/schemas/CurrentPlan","properties":{"current":{"description":"false when periodEnd has passed (the plan no longer applies).","type":"boolean"},"features":{"anyOf":[{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},{"type":"null"}],"description":"null = subscription from before plan features (not gated)."},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"periodStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"planCode":{"type":"string"},"planNameFa":{"type":"string"},"status":{"enum":["trialing","active"],"type":"string"},"usedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["planCode","planNameFa","status","current","periodStart","periodEnd","usedConfirmations","includedConfirmations","features","maxActiveLinks","maxDestinations"],"type":"object"},"DecideBrowserChallengeRequest":{"$id":"#/components/schemas/DecideBrowserChallengeRequest","properties":{"decision":{"enum":["approve","deny"],"type":"string"},"displayCode":{"description":"Optional code the user typed from their own browser (the second route). Without it, approve needs an existing PAYNYX account; a mismatch denies the challenge.","pattern":"^[0-9]{6}$","type":"string"},"displayName":{"maxLength":200,"minLength":1,"type":"string"},"handle":{"pattern":"^[0-9a-f]{32}$","type":"string"},"telegramUserId":{"description":"`from.id` of the authenticated Telegram update, as received by the bot. Never taken from message text or web input.","pattern":"^[0-9]{1,20}$","type":"string"},"telegramUsername":{"maxLength":64,"type":"string"}},"required":["handle","telegramUserId","displayName","decision"],"type":"object"},"Deposit":{"$id":"#/components/schemas/Deposit","properties":{"accountMask":{"type":["string","null"]},"amountRial":{"$ref":"#/components/schemas/AmountRial"},"assurance":{"enum":["relay_https","relay_sms","forwarder","manual","none"],"type":"string"},"bankCode":{"type":["string","null"]},"bankTime":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"cardMask":{"type":["string","null"]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"destinationId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"direction":{"enum":["deposit","withdrawal"],"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"invoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"observedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"possibleDuplicateOf":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"reference":{"type":["string","null"]},"reviewReason":{"type":["string","null"]},"status":{"enum":["unmatched","matched","review","ignored","duplicate"],"type":"string"}},"required":["id","status","reviewReason","direction","amountRial","bankCode","accountMask","cardMask","bankTime","observedAt","reference","assurance","destinationId","invoiceId","possibleDuplicateOf","createdAt"],"type":"object"},"DepositPage":{"$id":"#/components/schemas/DepositPage","properties":{"data":{"items":{"$ref":"#/components/schemas/Deposit"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"Destination":{"$id":"#/components/schemas/Destination","properties":{"accountNumber":{"type":["string","null"]},"bankCode":{"type":"string"},"cardNumber":{"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"dailyLimitRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"holderName":{"type":"string"},"iban":{"type":["string","null"]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"label":{"type":"string"},"smsAccountHints":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","paused","suspended","archived"],"type":"string"},"weight":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","label","cardNumber","iban","accountNumber","holderName","bankCode","smsAccountHints","status","dailyLimitRial","weight","createdAt"],"type":"object"},"DestinationCapacity":{"$id":"#/components/schemas/DestinationCapacity","properties":{"dailyAmountLimitRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}],"description":"Same value as Destination.dailyLimitRial."},"dailyCountLimit":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}]},"destinationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"enabled":{"description":"false when the destination is paused or suspended.","type":"boolean"},"healthPausePolicy":{"description":"android_relay: pause NEW allocations while every paired Android relay of this destination is offline AND no forwarder/Shortcuts evidence arrived recently. off: never paused by health.","enum":["off","android_relay"],"type":"string"},"maxInvoiceAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"minInvoiceAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"monthlyAmountLimitRial":{"anyOf":[{"maximum":100000000000000,"minimum":1,"type":"integer"},{"type":"null"}]},"schedule":{"anyOf":[{"$ref":"#/components/schemas/DestinationSchedule"},{"type":"null"}]},"status":{"enum":["active","paused","suspended","archived"],"type":"string"},"usage":{"$ref":"#/components/schemas/DestinationCapacityUsage"}},"required":["destinationId","enabled","status","dailyCountLimit","dailyAmountLimitRial","monthlyAmountLimitRial","minInvoiceAmountRial","maxInvoiceAmountRial","schedule","healthPausePolicy","usage"],"type":"object"},"DestinationCapacityUsage":{"$id":"#/components/schemas/DestinationCapacityUsage","properties":{"carriedOverCount":{"description":"Open invoices allocated in an earlier period that still hold capacity.","maximum":9007199254740991,"minimum":0,"type":"integer"},"confirmedTodayCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"confirmedTodayRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"dailyAmountRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"dailyCount":{"description":"Open, under-review and paid invoices allocated today plus still-open invoices carried over.","maximum":9007199254740991,"minimum":0,"type":"integer"},"day":{"description":"Tehran calendar day (YYYY-MM-DD, Gregorian).","type":"string"},"dayEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"dayStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"jalaliMonth":{"description":"Jalali month (YYYY-MM) in Tehran time used for the monthly cap.","type":"string"},"monthEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"monthStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"monthlyAmountRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["day","dayStart","dayEnd","jalaliMonth","monthStart","monthEnd","dailyCount","dailyAmountRial","monthlyAmountRial","carriedOverCount","confirmedTodayCount","confirmedTodayRial"],"type":"object"},"DestinationIneligibility":{"$id":"#/components/schemas/DestinationIneligibility","properties":{"destinationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"reasons":{"items":{"$ref":"#/components/schemas/IneligibilityReason"},"minItems":1,"type":"array"}},"required":["destinationId","reasons"],"type":"object"},"DestinationSchedule":{"$id":"#/components/schemas/DestinationSchedule","properties":{"windows":{"items":{"properties":{"days":{"description":"Tehran weekdays on which the window starts.","items":{"$ref":"#/components/schemas/Weekday"},"maxItems":7,"minItems":1,"type":"array"},"end":{"description":"Tehran time HH:MM (exclusive); 24:00 allowed. An end before start runs past midnight.","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$|^24:00$","type":"string"},"start":{"description":"Tehran time HH:MM (inclusive).","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$|^24:00$","type":"string"}},"required":["days","start","end"],"type":"object"},"maxItems":28,"minItems":1,"type":"array"}},"required":["windows"],"type":"object"},"Device":{"$id":"#/components/schemas/Device","properties":{"appVersion":{"type":["string","null"]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"destinationIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},"diagnostics":{"anyOf":[{"properties":{"batteryOptimizationIgnored":{"type":["boolean","null"]},"healthReason":{"anyOf":[{"enum":["offline","queue_backlog","permission_missing"],"type":"string"},{"type":"null"}]},"healthState":{"enum":["online","degraded","offline"],"type":"string"},"lastDeliveryAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"oldestQueuedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"permissions":{"anyOf":[{"properties":{"postNotifications":{"type":"boolean"},"receiveSms":{"type":"boolean"},"sendSms":{"type":"boolean"}},"required":["receiveSms","sendSms","postNotifications"],"type":"object"},{"type":"null"}]}},"required":["lastDeliveryAt","oldestQueuedAt","permissions","batteryOptimizationIgnored","healthState","healthReason"],"type":"object"},{"type":"null"}],"description":"Last relay-reported diagnostics (never message content). Null before the first heartbeat."},"health":{"enum":["healthy","degraded","offline","never_seen","revoked"],"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastSeenAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"name":{"type":"string"},"osVersion":{"type":["string","null"]},"queueDepth":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"smsFallbackEnabled":{"type":"boolean"},"status":{"enum":["active","revoked"],"type":"string"}},"required":["id","shortId","name","status","health","appVersion","osVersion","smsFallbackEnabled","lastSeenAt","queueDepth","destinationIds","createdAt","revokedAt"],"type":"object"},"DeviceConfig":{"$id":"#/components/schemas/DeviceConfig","properties":{"bankSenders":{"items":{"properties":{"bank":{"type":"string"},"senders":{"items":{"type":"string"},"type":"array"}},"required":["bank","senders"],"type":"object"},"type":"array"},"extraSenders":{"items":{"type":"string"},"type":"array"},"fallback":{"properties":{"enabled":{"type":"boolean"},"lineNumber":{"type":["string","null"]}},"required":["enabled","lineNumber"],"type":"object"},"heartbeatIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxBatchSize":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"merchantId":{"description":"The store this device relays for; the app matches it to an account store by id, never by name.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantName":{"type":"string"}},"required":["merchantId","merchantName","bankSenders","extraSenders","fallback","heartbeatIntervalSeconds","maxBatchSize"],"type":"object"},"DeviceDegradedReason":{"$id":"#/components/schemas/DeviceDegradedReason","enum":["offline","queue_backlog","permission_missing"],"type":"string"},"DeviceEvent":{"$id":"#/components/schemas/DeviceEvent","properties":{"body":{"maxLength":2000,"minLength":1,"type":"string"},"eventId":{"description":"UUIDv7 generated on the device; stable across retries and channels.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"receivedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"sender":{"maxLength":64,"minLength":1,"type":"string"},"simSlot":{"maximum":7,"minimum":0,"type":"integer"},"subscriptionId":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["eventId","sender","body","receivedAt"],"type":"object"},"DeviceEventResult":{"$id":"#/components/schemas/DeviceEventResult","properties":{"eventId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"reason":{"enum":["otp_detected","invalid_event"],"type":"string"},"status":{"enum":["accepted","duplicate","rejected"],"type":"string"}},"required":["eventId","status"],"type":"object"},"DeviceEventsRequest":{"$id":"#/components/schemas/DeviceEventsRequest","properties":{"events":{"items":{"$ref":"#/components/schemas/DeviceEvent"},"maxItems":50,"minItems":1,"type":"array"}},"required":["events"],"type":"object"},"DeviceEventsResponse":{"$id":"#/components/schemas/DeviceEventsResponse","properties":{"results":{"items":{"$ref":"#/components/schemas/DeviceEventResult"},"type":"array"},"serverTime":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["results","serverTime"],"type":"object"},"DeviceHeartbeatRequest":{"$id":"#/components/schemas/DeviceHeartbeatRequest","properties":{"appVersion":{"maxLength":40,"type":"string"},"batteryOptimizationIgnored":{"type":"boolean"},"lastDeliveryAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"oldestQueuedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"osVersion":{"maxLength":60,"type":"string"},"permissions":{"properties":{"postNotifications":{"type":"boolean"},"receiveSms":{"type":"boolean"},"sendSms":{"type":"boolean"}},"required":["receiveSms","sendSms","postNotifications"],"type":"object"},"queueDepth":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"sims":{"items":{"$ref":"#/components/schemas/DeviceSimInfo"},"maxItems":4,"type":"array"},"smsFallbackEnabled":{"type":"boolean"}},"required":["appVersion","osVersion","queueDepth","oldestQueuedAt","lastDeliveryAt","permissions","batteryOptimizationIgnored","smsFallbackEnabled","sims"],"type":"object"},"DeviceHeartbeatResponse":{"$id":"#/components/schemas/DeviceHeartbeatResponse","properties":{"config":{"$ref":"#/components/schemas/DeviceConfig"},"serverTime":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["serverTime","config"],"type":"object"},"DevicePairRequest":{"$id":"#/components/schemas/DevicePairRequest","properties":{"appVersion":{"maxLength":40,"type":"string"},"deviceName":{"maxLength":80,"minLength":1,"type":"string"},"locator":{"pattern":"^[0-9]{6}$","type":"string"},"osVersion":{"maxLength":60,"type":"string"},"secret":{"pattern":"^[A-HJ-NP-Z2-9]{8}$","type":"string"},"sims":{"default":[],"items":{"$ref":"#/components/schemas/DeviceSimInfo"},"maxItems":4,"type":"array"}},"required":["locator","secret","deviceName","appVersion","osVersion"],"type":"object"},"DevicePairResponse":{"$id":"#/components/schemas/DevicePairResponse","properties":{"config":{"$ref":"#/components/schemas/DeviceConfig"},"deviceId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"deviceSecret":{"description":"Shown once. Store in Android Keystore-protected storage.","type":"string"},"merchantName":{"type":"string"},"shortId":{"type":"string"}},"required":["deviceId","shortId","deviceSecret","merchantName","config"],"type":"object"},"DevicePairing":{"$id":"#/components/schemas/DevicePairing","properties":{"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"locator":{"type":"string"},"pairingUri":{"description":"paynyx://pair?u=…&l=…&s=… for the QR code.","type":"string"},"secret":{"description":"Shown once; expires with the pairing.","type":"string"}},"required":["id","locator","secret","pairingUri","expiresAt"],"type":"object"},"DeviceSimInfo":{"$id":"#/components/schemas/DeviceSimInfo","properties":{"carrier":{"maxLength":64,"type":"string"},"slot":{"maximum":7,"minimum":0,"type":"integer"},"subscriptionId":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["slot"],"type":"object"},"DicexProviderStatus":{"$id":"#/components/schemas/DicexProviderStatus","properties":{"apiKeyConfigured":{"description":"Whether a key is configured. The key itself is never returned.","type":"boolean"},"lines":{"items":{"properties":{"checkpointAgeSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"checkpointAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"consecutiveFailures":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"lastError":{"type":["string","null"]},"lastRunAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"lastSuccessAgeSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"lineNumberMasked":{"type":"string"}},"required":["lineNumberMasked","checkpointAt","checkpointAgeSeconds","lastRunAt","lastSuccessAt","lastSuccessAgeSeconds","consecutiveFailures","lastError"],"type":"object"},"type":"array"},"pollEnabled":{"type":"boolean"},"sendEnabled":{"type":"boolean"}},"required":["pollEnabled","sendEnabled","apiKeyConfigured","lines"],"type":"object"},"DiscountQuote":{"$id":"#/components/schemas/DiscountQuote","properties":{"codeLast4":{"type":"string"},"discountRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"kind":{"enum":["percent_off","amount_off"],"type":"string"},"listPriceRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"percentOff":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"planId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"priceRial":{"description":"listPriceRial - discountRial. 0 = the purchase is fully covered (no invoice).","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["planId","kind","codeLast4","percentOff","listPriceRial","discountRial","priceRial"],"type":"object"},"DiscountQuoteRequest":{"$id":"#/components/schemas/DiscountQuoteRequest","additionalProperties":false,"properties":{"code":{"maxLength":64,"minLength":4,"type":"string"},"planId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["code","planId"],"type":"object"},"ForwarderFormat":{"$id":"#/components/schemas/ForwarderFormat","enum":["paynyx.v1","incoming-sms-gateway.v1","ios-shortcut.v1"],"type":"string"},"ForwarderIncomingSmsGatewayV1Payload":{"$id":"#/components/schemas/ForwarderIncomingSmsGatewayV1Payload","properties":{"from":{"maxLength":64,"minLength":1,"type":"string"},"receivedStamp":{"anyOf":[{"maximum":8640000000000000,"minimum":0,"type":"integer"},{"pattern":"^\\d{1,16}$","type":"string"}],"description":"Forwarding time on the phone, Unix epoch milliseconds."},"sentStamp":{"anyOf":[{"maximum":8640000000000000,"minimum":0,"type":"integer"},{"pattern":"^\\d{1,16}$","type":"string"}],"description":"SMS timestamp, Unix epoch milliseconds (number or digit string)."},"sim":{"maxLength":32,"type":"string"},"text":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["from","text"],"type":"object"},"ForwarderIngestResult":{"$id":"#/components/schemas/ForwarderIngestResult","properties":{"reason":{"enum":["otp_detected","sender_not_allowed","timestamp_out_of_range"],"type":"string"},"serverTime":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"status":{"description":"`accepted` = durably stored for processing (NOT an invoice confirmation); `duplicate` = already stored; `rejected` = permanently refused and not stored (do not retry).","enum":["accepted","duplicate","rejected"],"type":"string"}},"required":["status","serverTime"],"type":"object"},"ForwarderKey":{"$id":"#/components/schemas/ForwarderKey","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"format":{"$ref":"#/components/schemas/ForwarderFormat"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"ingestUrl":{"description":"POST target for the forwarding app or Shortcut.","type":"string"},"lastUsedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"name":{"type":"string"},"prefix":{"description":"Public key identifier; part of the ingestion URL.","type":"string"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"status":{"enum":["active","revoked"],"type":"string"}},"required":["id","name","prefix","format","status","ingestUrl","createdAt","lastUsedAt","revokedAt"],"type":"object"},"ForwarderPaynyxV1Payload":{"$id":"#/components/schemas/ForwarderPaynyxV1Payload","additionalProperties":false,"properties":{"from":{"description":"Sender as shown on the phone. Untrusted: never proof of bank origin.","maxLength":64,"minLength":1,"type":"string"},"messageId":{"description":"Stable id from the forwarding app, if it has one; the hard deduplication key.","maxLength":128,"minLength":1,"type":"string"},"receivedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","type":"string"},{"maximum":8640000000000000,"minimum":0,"type":"integer"}],"description":"When the phone received the SMS: ISO-8601 with offset, or Unix epoch milliseconds."},"text":{"description":"Full bank transaction SMS body. Never send OTP or personal messages.","maxLength":2000,"minLength":1,"type":"string"}},"required":["from","text"],"type":"object"},"GrantBillingZeroFeeRequest":{"$id":"#/components/schemas/GrantBillingZeroFeeRequest","additionalProperties":false,"properties":{"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"GrantCodeKind":{"$id":"#/components/schemas/GrantCodeKind","description":"plan_grant = a plan for N days, free; percent_off / amount_off = a discount on a plan purchase.","enum":["plan_grant","percent_off","amount_off"],"type":"string"},"GrantCodeStatus":{"$id":"#/components/schemas/GrantCodeStatus","description":"redeemed = every allowed redemption has been used.","enum":["active","redeemed","expired","revoked"],"type":"string"},"GrantConditions":{"$id":"#/components/schemas/GrantConditions","properties":{"apiKeyOnly":{"description":"The grant covers only invoices created with the API key that redeemed the code (falls back to any API key of the merchant if that key is revoked or expires).","type":"boolean"},"merchantId":{"description":"Only this merchant may redeem.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"orderRefPrefix":{"description":"Covered invoices have an orderRef starting with this prefix, compared case-insensitively (printable ASCII, no spaces). Seamless: \"<bot_username>-\".","pattern":"^[\\x21-\\x7E]{1,64}$","type":"string"},"singleMerchant":{"description":"The first redeeming merchant locks the code.","type":"boolean"},"sourceIpAllowlist":{"description":"Server-observed creation IPs (CIDR) of covered invoices.","items":{"type":"string"},"type":"array"}},"required":["singleMerchant","apiKeyOnly"],"type":"object"},"GrantConditionsInput":{"$id":"#/components/schemas/GrantConditionsInput","additionalProperties":false,"properties":{"apiKeyOnly":{"description":"Default false for admin codes.","type":"boolean"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"orderRefPrefix":{"description":"Covered invoices have an orderRef starting with this prefix, compared case-insensitively (printable ASCII, no spaces). Seamless: \"<bot_username>-\".","pattern":"^[\\x21-\\x7E]{1,64}$","type":"string"},"singleMerchant":{"description":"Default true.","type":"boolean"},"sourceIpAllowlist":{"items":{"description":"IPv4/IPv6 address or CIDR network (e.g. 203.0.113.0/24, 2001:db8::/32).","examples":["203.0.113.10/32"],"maxLength":49,"minLength":2,"pattern":"^[0-9A-Fa-f:.]+(\\/[0-9]{1,3})?$","type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"type":"object"},"GrantPlatformRoleRequest":{"$id":"#/components/schemas/GrantPlatformRoleRequest","properties":{"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"role":{"$ref":"#/components/schemas/PlatformRole"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","role","reason"],"type":"object"},"GrantRedemption":{"$id":"#/components/schemas/GrantRedemption","properties":{"conditions":{"$ref":"#/components/schemas/MerchantGrantConditions"},"grantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"planCode":{"type":"string"}},"required":["grantId","planCode","periodEnd","includedConfirmations","conditions"],"type":"object"},"IneligibilityReason":{"$id":"#/components/schemas/IneligibilityReason","enum":["disabled","not_in_project","outside_schedule","amount_below_minimum","amount_above_maximum","daily_count_exceeded","daily_amount_exceeded","monthly_amount_exceeded","source_unhealthy"],"type":"string"},"InvitableRole":{"$id":"#/components/schemas/InvitableRole","description":"Any merchant role except owner (ownership moves only through owner transfer). The inviter must be able to assign the role.","enum":["admin","finance","developer","support","readonly","restricted"],"type":"string"},"Invitation":{"$id":"#/components/schemas/Invitation","properties":{"acceptedBy":{"anyOf":[{"properties":{"displayName":{"type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName"],"type":"object"},{"type":"null"}]},"boundToTelegramUser":{"description":"true when only one specific Telegram account may accept.","type":"boolean"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"decidedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"invitedBy":{"properties":{"displayName":{"type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName"],"type":"object"},"note":{"type":["string","null"]},"role":{"$ref":"#/components/schemas/InvitableRole"},"status":{"$ref":"#/components/schemas/InvitationStatus"}},"required":["id","role","status","note","boundToTelegramUser","invitedBy","acceptedBy","expiresAt","createdAt","decidedAt"],"type":"object"},"InvitationList":{"$id":"#/components/schemas/InvitationList","properties":{"data":{"items":{"$ref":"#/components/schemas/Invitation"},"type":"array"}},"required":["data"],"type":"object"},"InvitationPreview":{"$id":"#/components/schemas/InvitationPreview","properties":{"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"invitedBy":{"description":"Display name of the inviter.","type":"string"},"merchantName":{"type":"string"},"role":{"$ref":"#/components/schemas/InvitableRole"}},"required":["merchantName","role","expiresAt","invitedBy"],"type":"object"},"InvitationStatus":{"$id":"#/components/schemas/InvitationStatus","description":"A pending invitation past expiresAt is reported as expired.","enum":["pending","accepted","revoked","expired"],"type":"string"},"InvitationTokenRequest":{"$id":"#/components/schemas/InvitationTokenRequest","properties":{"token":{"description":"The invitation token as shared by the inviter.","pattern":"^inv_[A-Za-z0-9_-]{43}$","type":"string"}},"required":["token"],"type":"object"},"Invoice":{"$id":"#/components/schemas/Invoice","properties":{"approvalMode":{"description":"Approval policy snapshot taken at creation. manual_review: matched evidence always waits for a human decision.","enum":["automatic","manual_review"],"type":"string"},"attempt":{"description":"Attempt number among invoices with the same orderRef and mode (1 for the first or when orderRef is null).","maximum":9007199254740991,"minimum":1,"type":"integer"},"baseAmountRial":{"$ref":"#/components/schemas/AmountRial"},"cancelledAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"checkoutUrl":{"format":"uri","type":"string"},"confirmation":{"anyOf":[{"$ref":"#/components/schemas/InvoiceConfirmation"},{"type":"null"}]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"currency":{"const":"IRR","type":"string"},"customerFeeRial":{"maximum":100000000,"minimum":0,"type":"integer"},"customerRef":{"type":["string","null"]},"description":{"type":["string","null"]},"destination":{"$ref":"#/components/schemas/PaymentDestination"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantFeeRial":{"description":"PAYNYX service charge debited from service credit on confirmation.","maximum":100000000,"minimum":0,"type":"integer"},"metadata":{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"},"object":{"const":"invoice","type":"string"},"offsetRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"orderRef":{"type":["string","null"]},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"payableAmountRial":{"$ref":"#/components/schemas/AmountRial","description":"The EXACT amount the buyer must transfer, in rial."},"previousInvoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Previous attempt for the same orderRef, if any. Earlier attempts keep their own id and history."},"projectId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Project the invoice belongs to, if any."},"publicId":{"type":"string"},"returnUrl":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/InvoiceStatus"}},"required":["id","object","publicId","status","baseAmountRial","customerFeeRial","offsetRial","payableAmountRial","merchantFeeRial","currency","destination","orderRef","attempt","previousInvoiceId","customerRef","description","metadata","checkoutUrl","returnUrl","expiresAt","paidAt","cancelledAt","confirmation","projectId","approvalMode","createdAt"],"type":"object"},"InvoiceConfirmation":{"$id":"#/components/schemas/InvoiceConfirmation","properties":{"bankTime":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"depositId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"evidenceAssurance":{"enum":["relay_https","relay_sms","forwarder","manual"],"type":"string"},"kind":{"enum":["auto","manual"],"type":"string"},"reference":{"type":["string","null"]}},"required":["kind","depositId","bankTime","reference","evidenceAssurance"],"type":"object"},"InvoicePage":{"$id":"#/components/schemas/InvoicePage","properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"InvoiceStatus":{"$id":"#/components/schemas/InvoiceStatus","description":"open: awaiting transfer · paid: confirmed by matched bank evidence (terminal) · review: evidence needs a human decision · expired / cancelled: no longer payable (late transfers go to review).","enum":["open","paid","review","expired","cancelled"],"type":"string"},"InvoiceVerification":{"$id":"#/components/schemas/InvoiceVerification","properties":{"approvalMode":{"description":"Approval policy snapshot of this invoice.","enum":["automatic","manual_review"],"type":"string"},"checkedAt":{"description":"Server time of this authoritative read.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"confirmationKind":{"anyOf":[{"enum":["auto","manual"],"type":"string"},{"type":"null"}],"description":"How the payment was confirmed; null unless paid."},"evidenceAssurance":{"anyOf":[{"enum":["relay_https","relay_sms","forwarder","manual"],"type":"string"},{"type":"null"}],"description":"Assurance class of the matched evidence (which channel delivered it, not proof that a bank sent it); null unless paid."},"fulfillable":{"description":"true only when status = paid (bank evidence matched automatically, or an audited manual decision). Before fulfilling, still compare orderRef, amounts, and currency with your own order.","type":"boolean"}},"required":["checkedAt","fulfillable","confirmationKind","evidenceAssurance","approvalMode"],"type":"object"},"IosShortcutPayload":{"$id":"#/components/schemas/IosShortcutPayload","additionalProperties":false,"properties":{"receivedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","type":"string"},{"maximum":8640000000000000,"minimum":0,"type":"integer"}],"description":"Optional phone time: ISO-8601 with offset, or Unix epoch milliseconds. Server receipt time otherwise; same freshness rules as other forwarders."},"text":{"description":"Full bank transaction SMS body. Never send OTP or personal messages.","maxLength":2000,"minLength":1,"type":"string"}},"required":["text"],"type":"object"},"IosShortcutResult":{"$id":"#/components/schemas/IosShortcutResult","properties":{"amountRial":{"description":"Parsed deposit amount in rial, when known.","maximum":9007199254740991,"minimum":1,"type":"integer"},"duplicate":{"description":"True when this exact message had already been received; nothing new was stored or charged.","type":"boolean"},"messageFa":{"description":"Short Persian sentence for the iPhone notification; show as-is.","type":"string"},"reason":{"description":"Machine-readable detail of `status`.","enum":["auto_confirmed","pending_review","no_open_invoice","unreadable_format","processing","not_transaction","withdrawal","otp_detected","timestamp_out_of_range","unknown_bank","bank_not_on_cards"],"type":"string"},"serverTime":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"status":{"$ref":"#/components/schemas/IosShortcutStatus"}},"required":["status","reason","messageFa","serverTime"],"type":"object"},"IosShortcutStatus":{"$id":"#/components/schemas/IosShortcutStatus","description":"`matched` = an invoice was confirmed paid; `review` = stored and waiting for the merchant (or no open invoice / not machine-readable); `ignored` = not a deposit, nothing stored; `rejected` = refused and not stored (OTP, wrong bank, stale time).","enum":["matched","review","ignored","rejected"],"type":"string"},"MarkNotificationsReadRequest":{"$id":"#/components/schemas/MarkNotificationsReadRequest","anyOf":[{"additionalProperties":false,"properties":{"ids":{"description":"Notifications to mark as read; ids of other users or merchants are ignored.","items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["ids"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":true,"description":"Mark every unread notification of the signed-in user in this merchant as read.","type":"boolean"}},"required":["all"],"type":"object"}]},"MarkNotificationsReadResult":{"$id":"#/components/schemas/MarkNotificationsReadResult","properties":{"unreadCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"updated":{"description":"Rows that were unread and are now read (0 on a repeat).","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["updated","unreadCount"],"type":"object"},"Me":{"$id":"#/components/schemas/Me","properties":{"session":{"properties":{"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"enum":["web","miniapp","android"],"type":"string"}},"required":["id","kind","expiresAt"],"type":"object"},"user":{"properties":{"displayName":{"type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"phone":{"anyOf":[{"properties":{"display":{"type":"string"},"masked":{"type":"string"}},"required":["display","masked"],"type":"object"},{"type":"null"}],"description":"Verified mobile number, if any."},"phoneRequired":{"description":"true until a number is verified (Telegram-only accounts).","type":"boolean"},"telegramUsername":{"type":["string","null"]}},"required":["id","displayName","telegramUsername"],"type":"object"}},"required":["user","session"],"type":"object"},"Member":{"$id":"#/components/schemas/Member","properties":{"displayName":{"type":"string"},"isCurrentUser":{"type":"boolean"},"joinedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"membershipId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"role":{"$ref":"#/components/schemas/Role"},"telegramUsername":{"type":["string","null"]},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["membershipId","userId","displayName","telegramUsername","role","joinedAt","isCurrentUser"],"type":"object"},"MemberList":{"$id":"#/components/schemas/MemberList","properties":{"data":{"items":{"$ref":"#/components/schemas/Member"},"type":"array"}},"required":["data"],"type":"object"},"Merchant":{"$id":"#/components/schemas/Merchant","properties":{"branding":{"properties":{"accentColor":{"type":"string"},"displayName":{"type":"string"},"logoUrl":{"type":"string"},"supportTelegram":{"type":"string"},"supportUrl":{"type":"string"}},"type":"object"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"forwarderAutoConfirm":{"type":"boolean"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role","description":"The caller's role in this merchant."},"routingStrategy":{"enum":["manual","random","round_robin","least_success","health","least_loaded"],"type":"string"},"smsSenderAllowlist":{"description":"Bank SMS sender IDs the relay forwards (as shown on the phone).","items":{"type":"string"},"type":"array"},"status":{"enum":["active","suspended","closed"],"type":"string"}},"required":["id","name","status","role","routingStrategy","smsSenderAllowlist","forwarderAutoConfirm","branding","createdAt"],"type":"object"},"MerchantGrant":{"$id":"#/components/schemas/MerchantGrant","properties":{"codeLast4":{"type":"string"},"conditions":{"$ref":"#/components/schemas/MerchantGrantConditions"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"features":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"issuer":{"enum":["admin","partner"],"type":"string"},"partnerName":{"type":["string","null"]},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"periodStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"planCode":{"type":"string"},"planNameFa":{"type":"string"},"redeemedVia":{"enum":["api_key","session"],"type":"string"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/MerchantGrantStatus"},"usedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","codeLast4","planCode","planNameFa","features","includedConfirmations","usedConfirmations","periodStart","periodEnd","status","issuer","partnerName","conditions","redeemedVia","createdAt","revokedAt"],"type":"object"},"MerchantGrantConditions":{"$id":"#/components/schemas/MerchantGrantConditions","properties":{"apiKeyId":{"description":"The API key that redeemed the code (apiKeyOnly).","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"apiKeyOnly":{"type":"boolean"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"orderRefPrefix":{"description":"Covered invoices have an orderRef starting with this prefix, compared case-insensitively (printable ASCII, no spaces). Seamless: \"<bot_username>-\".","pattern":"^[\\x21-\\x7E]{1,64}$","type":"string"},"singleMerchant":{"type":"boolean"},"sourceIpAllowlist":{"items":{"type":"string"},"type":"array"}},"required":["singleMerchant","apiKeyOnly"],"type":"object"},"MerchantGrantList":{"$id":"#/components/schemas/MerchantGrantList","properties":{"data":{"items":{"$ref":"#/components/schemas/MerchantGrant"},"type":"array"}},"required":["data"],"type":"object"},"MerchantGrantStatus":{"$id":"#/components/schemas/MerchantGrantStatus","description":"exhausted = no confirmations left; scheduled = the period has not started yet.","enum":["active","scheduled","exhausted","expired","revoked"],"type":"string"},"MerchantPlan":{"$id":"#/components/schemas/MerchantPlan","properties":{"code":{"type":"string"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"nameFa":{"type":"string"},"periodDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"priceRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","code","nameFa","priceRial","includedConfirmations","periodDays","features","maxActiveLinks","maxDestinations"],"type":"object"},"MerchantPlanCatalog":{"$id":"#/components/schemas/MerchantPlanCatalog","properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/CurrentPlan"},{"type":"null"}]},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureInfo"},"type":"array"},"plans":{"description":"Active, non-example plans, cheapest first. Empty = plans are not on sale yet.","items":{"$ref":"#/components/schemas/MerchantPlan"},"type":"array"},"purchaseAvailable":{"description":"false = online purchase is not switched on yet (billing merchant not ready) or there is no plan.","type":"boolean"},"unavailableReason":{"anyOf":[{"enum":["no_plans","billing_unavailable"],"type":"string"},{"type":"null"}]}},"required":["plans","features","purchaseAvailable","unavailableReason","current"],"type":"object"},"MerchantSalesReport":{"$id":"#/components/schemas/MerchantSalesReport","properties":{"attempts":{"properties":{"cancelled":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"created":{"description":"Invoices CREATED inside the range, by current status.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"expired":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"open":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"paid":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"review":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["created","open","review","paid","expired","cancelled"],"type":"object"},"byCreatedVia":{"items":{"properties":{"baseSalesRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"createdVia":{"enum":["api","dashboard","link","bot"],"type":"string"},"customerPaidRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["createdVia","successfulCount","baseSalesRial","customerPaidRial"],"type":"object"},"type":"array"},"byDestination":{"items":{"properties":{"bankCode":{"type":"string"},"baseSalesRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"cardMask":{"description":"Masked card number (first 6 and last 4 digits).","type":"string"},"customerPaidRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"destinationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"label":{"type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["destinationId","label","cardMask","bankCode","successfulCount","baseSalesRial","customerPaidRial"],"type":"object"},"type":"array"},"byEvidenceChannel":{"items":{"properties":{"baseSalesRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"channel":{"description":"Evidence channel of the matched deposit (e.g. relay_https, relay_sms, forwarder, manual) or unknown.","type":"string"},"customerPaidRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["channel","successfulCount","baseSalesRial","customerPaidRial"],"type":"object"},"type":"array"},"daily":{"description":"Every Tehran day of the range, zero-filled.","items":{"properties":{"baseSalesRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"customerPaidRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"},"day":{"type":"string"},"successfulCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["day","successfulCount","baseSalesRial","customerPaidRial"],"type":"object"},"type":"array"},"range":{"properties":{"endUtc":{"description":"Exclusive end.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fromDay":{"type":"string"},"startUtc":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"timezone":{"const":"Asia/Tehran (UTC+03:30)","type":"string"},"toDay":{"type":"string"}},"required":["fromDay","toDay","startUtc","endUtc","timezone"],"type":"object"},"sales":{"properties":{"autoConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"baseSalesRial":{"description":"Sum of base amounts of paid invoices: merchant sales received directly in the merchant accounts. Not profit, not PAYNYX revenue.","pattern":"^[0-9]{1,24}$","type":"string"},"customerFeesRial":{"description":"Service-fee share paid by buyers inside the transferred amounts.","pattern":"^[0-9]{1,24}$","type":"string"},"customerPaidRial":{"description":"Sum of exact amounts buyers transferred (base + customer fee + matching offset).","pattern":"^[0-9]{1,24}$","type":"string"},"manualConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"offsetsRial":{"description":"Matching offsets (small unique-amount adjustments) inside the transferred amounts.","pattern":"^[0-9]{1,24}$","type":"string"},"successfulCount":{"description":"Invoices PAID inside the range (by paidAt).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["successfulCount","baseSalesRial","customerPaidRial","customerFeesRial","offsetsRial","autoConfirmations","manualConfirmations"],"type":"object"},"serviceCharges":{"properties":{"bySource":{"items":{"properties":{"count":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"feeSource":{"enum":["credit","quota","entitlement","grant"],"type":"string"},"totalRial":{"description":"Non-negative integer rial as a decimal string (exact for any total).","pattern":"^[0-9]{1,24}$","type":"string"}},"required":["feeSource","count","totalRial"],"type":"object"},"type":"array"},"totalRial":{"description":"PAYNYX service charges for the paid invoices, settled from service credit/quota/entitlement — never deducted from sales.","pattern":"^[0-9]{1,24}$","type":"string"}},"required":["totalRial","bySource"],"type":"object"}},"required":["range","sales","serviceCharges","attempts","daily","byDestination","byCreatedVia","byEvidenceChannel"],"type":"object"},"MessengerChannel":{"$id":"#/components/schemas/MessengerChannel","enum":["telegram","bale"],"type":"string"},"MessengerLink":{"$id":"#/components/schemas/MessengerLink","properties":{"channel":{"$ref":"#/components/schemas/MessengerChannel"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"platformUsername":{"type":["string","null"]},"scope":{"$ref":"#/components/schemas/MessengerLinkScope"}},"required":["id","channel","platformUsername","scope","createdAt"],"type":"object"},"MessengerLinkCode":{"$id":"#/components/schemas/MessengerLinkCode","properties":{"botUsername":{"description":"Public username (without @) of this channel's PAYNYX bot, for a one-tap deep link (`/start <code>`). Effective TELEGRAM_BOT_USERNAME / BALE_BOT_USERNAME (managed setting first, environment fallback); null when not configured. Not a secret.","type":["string","null"]},"channel":{"$ref":"#/components/schemas/MessengerChannel"},"code":{"description":"Single-use code to send to the PAYNYX bot. Shown ONCE; only its HMAC is stored.","type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["channel","code","expiresAt","botUsername"],"type":"object"},"MessengerLinkDetail":{"$id":"#/components/schemas/MessengerLinkDetail","properties":{"channel":{"$ref":"#/components/schemas/MessengerChannel"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"notifyScope":{"$ref":"#/components/schemas/MessengerScopeIds"},"reviewEnabled":{"type":"boolean"}},"required":["id","channel","notifyScope","reviewEnabled"],"type":"object"},"MessengerLinkScope":{"$id":"#/components/schemas/MessengerLinkScope","anyOf":[{"properties":{"kind":{"const":"notifications_only","type":"string"}},"required":["kind"],"type":"object"},{"properties":{"destinationIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},"kind":{"const":"review","type":"string"},"merchantIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},"projectIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"}},"required":["kind","merchantIds","projectIds","destinationIds"],"type":"object"}]},"MessengerScopeIds":{"$id":"#/components/schemas/MessengerScopeIds","properties":{"destinationIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":100,"type":"array"},"merchantIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":100,"type":"array"},"projectIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":100,"type":"array"}},"required":["merchantIds","projectIds","destinationIds"],"type":"object"},"MiniAppLoginRequest":{"$id":"#/components/schemas/MiniAppLoginRequest","properties":{"initData":{"description":"Raw Telegram.WebApp.initData string.","maxLength":8192,"minLength":1,"type":"string"}},"required":["initData"],"type":"object"},"Notification":{"$id":"#/components/schemas/Notification","properties":{"bodyFa":{"type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"linkPath":{"description":"Relative dashboard path (`/dashboard` or `/dashboard/...`) to open; null when the row has none or it is not a dashboard path.","type":["string","null"]},"readAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"severity":{"$ref":"#/components/schemas/NotificationSeverity"},"titleFa":{"type":"string"},"type":{"description":"Event type, e.g. invoice.paid, deposit.review_required, device.offline, credit.low.","type":"string"}},"required":["id","type","severity","titleFa","bodyFa","linkPath","createdAt","readAt"],"type":"object"},"NotificationPage":{"$id":"#/components/schemas/NotificationPage","properties":{"data":{"description":"Newest first.","items":{"$ref":"#/components/schemas/Notification"},"type":"array"},"nextCursor":{"type":["string","null"]},"unreadCount":{"description":"Unread notifications of the signed-in user in this merchant (independent of unreadOnly and the cursor).","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["data","nextCursor","unreadCount"],"type":"object"},"NotificationPreference":{"$id":"#/components/schemas/NotificationPreference","properties":{"channel":{"$ref":"#/components/schemas/NotifyChannel"},"enabled":{"type":"boolean"},"eventType":{"$ref":"#/components/schemas/NotifyEvent"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["merchantId","eventType","channel","enabled"],"type":"object"},"NotificationPreferencesResponse":{"$id":"#/components/schemas/NotificationPreferencesResponse","properties":{"data":{"description":"Explicit choices only; events without a row use `defaults`.","items":{"$ref":"#/components/schemas/NotificationPreference"},"type":"array"},"defaults":{"additionalProperties":{"type":"boolean"},"description":"Messenger defaults per event when no explicit choice exists.","propertyNames":{"type":"string"},"type":"object"}},"required":["data","defaults"],"type":"object"},"NotificationSeverity":{"$id":"#/components/schemas/NotificationSeverity","enum":["info","warning","critical","security"],"type":"string"},"NotifyChannel":{"$id":"#/components/schemas/NotifyChannel","enum":["in_app","telegram","bale"],"type":"string"},"NotifyEvent":{"$id":"#/components/schemas/NotifyEvent","enum":["invoice.paid","deposit.review_required","deposit.rejected","invoice.expired","deposit.unmatched","device.offline","device.degraded","device.online","credit.low","webhook.failing","summary.daily"],"type":"string"},"OpenBrowserChallengeRequest":{"$id":"#/components/schemas/OpenBrowserChallengeRequest","properties":{"displayName":{"maxLength":200,"minLength":1,"type":"string"},"startParam":{"description":"The `/start` parameter exactly as Telegram delivered it (`login_<token>`; Telegram allows A-Z a-z 0-9 _ - and at most 64 characters).","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"},"telegramUserId":{"description":"`from.id` of the authenticated Telegram update, as received by the bot. Never taken from message text or web input.","pattern":"^[0-9]{1,20}$","type":"string"},"telegramUsername":{"maxLength":64,"type":"string"}},"required":["startParam","telegramUserId","displayName"],"type":"object"},"OpenedBrowserChallenge":{"$id":"#/components/schemas/OpenedBrowserChallenge","properties":{"accountDisplayName":{"type":["string","null"]},"browserSummary":{"description":"Coarse \"Browser · OS\" of the requesting browser, for phishing awareness.","type":["string","null"]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"deviceLabel":{"description":"Android app logins: the device name the app reported.","type":["string","null"]},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"handle":{"description":"One-time opaque handle for the inline buttons; rotated on every open and void after a decision.","pattern":"^[0-9a-f]{32}$","type":"string"},"purpose":{"description":"android_app_login: the PAYNYX Android app asks to sign in (show deviceLabel).","enum":["browser_login","android_app_login"],"type":"string"},"status":{"description":"ready: an existing PAYNYX account can approve with one tap. no_account: no PAYNYX account is linked to this Telegram account (the typed browser code may create one when telegramSignupAllowed). account_blocked: Telegram sign-in is not allowed for this account (suspended, or Telegram login switched off without a verified number).","enum":["ready","no_account","account_blocked"],"type":"string"},"telegramSignupAllowed":{"type":"boolean"}},"required":["status","accountDisplayName","browserSummary","createdAt","expiresAt","telegramSignupAllowed"],"type":"object"},"OtpChallengeIssued":{"$id":"#/components/schemas/OtpChallengeIssued","properties":{"challengeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"codeLength":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"resendAfter":{"description":"Earliest time another code can be requested for the same number.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["challengeId","expiresAt","resendAfter","codeLength"],"type":"object"},"OtpPurpose":{"$id":"#/components/schemas/OtpPurpose","enum":["sign_up","sign_in","change_phone","recover_account","step_up"],"type":"string"},"OwnerTransferRequest":{"$id":"#/components/schemas/OwnerTransferRequest","properties":{"confirmMerchantName":{"description":"Must equal the merchant name exactly (typed confirmation).","maxLength":120,"minLength":1,"type":"string"},"membershipId":{"description":"Active member who becomes the owner.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["membershipId","confirmMerchantName"],"type":"object"},"OwnerTransferResult":{"$id":"#/components/schemas/OwnerTransferResult","properties":{"newOwner":{"$ref":"#/components/schemas/Member"},"previousOwner":{"$ref":"#/components/schemas/Member"},"previousOwnerRole":{"const":"admin","description":"The previous owner stays as an admin.","type":"string"}},"required":["previousOwner","newOwner","previousOwnerRole"],"type":"object"},"PartnerGrantCode":{"$id":"#/components/schemas/PartnerGrantCode","properties":{"conditions":{"$ref":"#/components/schemas/GrantConditions"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"durationDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"grant":{"anyOf":[{"properties":{"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"merchantRef":{"description":"Stable opaque merchant reference for this partner (no merchant identity).","type":"string"},"periodEnd":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"periodStart":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"usedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["merchantRef","periodStart","periodEnd","includedConfirmations","usedConfirmations","revokedAt"],"type":"object"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"const":"plan_grant","type":"string"},"partnerReference":{"type":["string","null"]},"planCode":{"type":"string"},"redeemedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/GrantCodeStatus"}},"required":["id","kind","planCode","durationDays","status","expiresAt","createdAt","redeemedAt","revokedAt","partnerReference","conditions","grant"],"type":"object"},"PartnerGrantCodeCreated":{"$id":"#/components/schemas/PartnerGrantCodeCreated","properties":{"code":{"description":"The code (PNX-XXXX-XXXX-XXXX-XXXX). Returned only by the first response: the plaintext is never stored, so an idempotent replay returns null (revoke that id and issue a new code with a new Idempotency-Key).","type":["string","null"]},"conditions":{"$ref":"#/components/schemas/GrantConditions"},"durationDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"const":"plan_grant","type":"string"},"planCode":{"type":"string"},"replayed":{"description":"true when this is an idempotent replay of an earlier request (code is then null).","type":"boolean"}},"required":["id","code","replayed","kind","planCode","durationDays","expiresAt","conditions"],"type":"object"},"PartnerGrantConditionsInput":{"$id":"#/components/schemas/PartnerGrantConditionsInput","additionalProperties":false,"properties":{"orderRefPrefix":{"description":"Covered invoices have an orderRef starting with this prefix, compared case-insensitively (printable ASCII, no spaces). Seamless: \"<bot_username>-\".","pattern":"^[\\x21-\\x7E]{1,64}$","type":"string"},"sourceIpAllowlist":{"description":"Defaults to the partner's own IP allowlist.","items":{"description":"IPv4/IPv6 address or CIDR network (e.g. 203.0.113.0/24, 2001:db8::/32).","examples":["203.0.113.10/32"],"maxLength":49,"minLength":2,"pattern":"^[0-9A-Fa-f:.]+(\\/[0-9]{1,3})?$","type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"type":"object"},"PartnerRevokeRequest":{"$id":"#/components/schemas/PartnerRevokeRequest","additionalProperties":false,"properties":{"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"PartnerScope":{"$id":"#/components/schemas/PartnerScope","enum":["grant_codes:write","grant_codes:read"],"type":"string"},"PaymentDestination":{"$id":"#/components/schemas/PaymentDestination","properties":{"bankCode":{"type":"string"},"cardNumber":{"pattern":"^[0-9]{16}$","type":"string"},"holderName":{"type":"string"},"iban":{"type":["string","null"]}},"required":["cardNumber","holderName","bankCode","iban"],"type":"object"},"PaymentLink":{"$id":"#/components/schemas/PaymentLink","properties":{"amountMode":{"description":"fixed: amountRial · open: the buyer enters an amount between minAmountRial and maxAmountRial.","enum":["fixed","open"],"type":"string"},"amountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"buyerNote":{"properties":{"label":{"type":["string","null"]},"mode":{"enum":["none","optional","required"],"type":"string"}},"required":["mode","label"],"type":"object"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"description":{"type":["string","null"]},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"maxUses":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Upper bound on attempts that are open (unexpired), under review or paid. Expired/cancelled attempts free their slot."},"minAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"object":{"const":"payment_link","type":"string"},"orderRefPrefix":{"type":["string","null"]},"publicUrl":{"description":"Buyer URL. Also the QR payload (the client renders the QR).","format":"uri","type":"string"},"qrPayload":{"type":"string"},"slug":{"description":"Public link identifier: 3–63 lowercase letters, digits and dashes.","pattern":"^[a-z0-9][a-z0-9-]{2,62}$","type":"string"},"stats":{"properties":{"activeAttempts":{"description":"Open (unexpired) or under review now.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"attemptsCreated":{"description":"Every attempt ever started from this link.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"paidBaseRial":{"description":"Sum of base amounts of paid attempts, integer rial as a decimal string. Merchant sales, not profit.","pattern":"^[0-9]{1,24}$","type":"string"},"paidCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["attemptsCreated","activeAttempts","paidCount","paidBaseRial"],"type":"object"},"status":{"enum":["active","disabled"],"type":"string"},"title":{"type":"string"},"ttlSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Invoice lifetime for attempts; null uses the merchant default."},"updatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","object","slug","title","description","amountMode","amountRial","minAmountRial","maxAmountRial","orderRefPrefix","buyerNote","ttlSeconds","maxUses","status","expiresAt","publicUrl","qrPayload","stats","createdAt","updatedAt"],"type":"object"},"PaymentLinkPage":{"$id":"#/components/schemas/PaymentLinkPage","properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentLink"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"PhoneSummary":{"$id":"#/components/schemas/PhoneSummary","properties":{"display":{"type":"string"},"masked":{"type":"string"},"verifiedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["display","masked","verifiedAt"],"type":"object"},"PlanFeatureCode":{"$id":"#/components/schemas/PlanFeatureCode","description":"Plan feature flag. `planned` features (see PlanFeatureInfo.status) are shown as coming soon and never enforced.","enum":["links_unlimited","destinations_unlimited","api_webhooks","messenger_notify","export_csv","sales_charts","link_pay_limit","link_qr","smart_split","checkout_branding","team_members","priority_support","sms_notify","custom_link_slug","iran_ip_only"],"type":"string"},"PlanFeatureInfo":{"$id":"#/components/schemas/PlanFeatureInfo","properties":{"code":{"$ref":"#/components/schemas/PlanFeatureCode"},"enforced":{"description":"The API refuses the gated action for a current plan without this feature.","type":"boolean"},"labelFa":{"type":"string"},"status":{"description":"available = exists in PAYNYX today; planned = not built yet (coming soon).","enum":["available","planned"],"type":"string"}},"required":["code","labelFa","status","enforced"],"type":"object"},"PlanPurchase":{"$id":"#/components/schemas/PlanPurchase","properties":{"checkoutUrl":{"description":"Public PAYNYX checkout page of the billing invoice (/pay/<publicId>); null for paymentMethod discount.","type":["string","null"]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"discountRial":{"description":"Discount from a percent_off / amount_off code (floor of the percentage), integer rial.","maximum":9007199254740991,"minimum":0,"type":"integer"},"endedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"When the billing invoice stops accepting payment; null for paymentMethod discount."},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"listPriceRial":{"description":"Plan price at purchase time, before any discount code.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"payableAmountRial":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Exact amount to transfer (price + uniqueness offset), as shown on the checkout page; null for paymentMethod discount."},"paymentMethod":{"description":"invoice = paid card-to-card through a billing invoice; discount = fully covered by a 100 % discount code (no invoice).","enum":["invoice","discount"],"type":"string"},"periodDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"planCode":{"type":"string"},"planId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"planNameFa":{"type":"string"},"priceRial":{"description":"Amount actually charged: listPriceRial - discountRial (0 for a 100 % discount).","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"status":{"$ref":"#/components/schemas/PlanPurchaseStatus"}},"required":["id","planId","planCode","planNameFa","priceRial","listPriceRial","discountRial","paymentMethod","includedConfirmations","periodDays","features","maxActiveLinks","maxDestinations","status","createdAt","paidAt","endedAt","checkoutUrl","payableAmountRial","expiresAt"],"type":"object"},"PlanPurchasePage":{"$id":"#/components/schemas/PlanPurchasePage","properties":{"data":{"items":{"$ref":"#/components/schemas/PlanPurchase"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"PlanPurchaseStatus":{"$id":"#/components/schemas/PlanPurchaseStatus","enum":["pending","paid","expired","cancelled"],"type":"string"},"PlatformAuditEntry":{"$id":"#/components/schemas/PlatformAuditEntry","properties":{"action":{"type":"string"},"actorKind":{"enum":["staff","cli"],"type":"string"},"actorRole":{"type":["string","null"]},"actorUserId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"after":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}]},"before":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"ledgerTransactionId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"merchantId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"reason":{"type":["string","null"]},"requestId":{"type":["string","null"]},"targetId":{"type":["string","null"]},"targetType":{"type":["string","null"]}},"required":["id","actorKind","actorUserId","actorRole","action","targetType","targetId","merchantId","reason","requestId","before","after","ledgerTransactionId","createdAt"],"type":"object"},"PlatformAuditPage":{"$id":"#/components/schemas/PlatformAuditPage","properties":{"data":{"items":{"$ref":"#/components/schemas/PlatformAuditEntry"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"PlatformRole":{"$id":"#/components/schemas/PlatformRole","enum":["platform_owner","platform_operator","platform_finance","platform_support","platform_analyst"],"type":"string"},"PlatformStaffMember":{"$id":"#/components/schemas/PlatformStaffMember","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"grantSource":{"enum":["bootstrap_cli","recovery_cli","admin_api"],"type":"string"},"grantedBy":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"role":{"$ref":"#/components/schemas/PlatformRole"},"status":{"enum":["active","suspended","revoked"],"type":"string"},"updatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName","role","status","grantSource","grantedBy","createdAt","updatedAt"],"type":"object"},"Problem":{"$id":"#/components/schemas/Problem","properties":{"code":{"description":"Stable machine-readable error code.","type":"string"},"detail":{"type":"string"},"errors":{"description":"Validation errors, when code = validation_failed.","items":{"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["path","message"],"type":"object"},"type":"array"},"feature":{"description":"When code = plan_feature_required or plan_limit_reached: the PlanFeatureCode that unlocks the action.","type":"string"},"ineligibleDestinations":{"description":"When code = no_eligible_destination: each of the merchant's destinations that was considered and why it was skipped.","items":{"$ref":"#/components/schemas/DestinationIneligibility"},"type":"array"},"limit":{"description":"When code = plan_limit_reached: the plan limit that was reached.","properties":{"max":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"name":{"enum":["maxActiveLinks","maxDestinations"],"type":"string"}},"required":["name","max"],"type":"object"},"messageFa":{"description":"Short Persian message for display as-is (set by the iPhone Shortcut intake, which shows it in a notification).","type":"string"},"requestId":{"type":"string"},"status":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"title":{"type":"string"},"type":{"description":"Stable problem type identifier: the tag URI `tag:nyxon.tech,2026:paynyx:problem:<code>` (not a web page). Branch on `code`.","type":"string"}},"required":["type","title","status","code","requestId"],"type":"object"},"Project":{"$id":"#/components/schemas/Project","properties":{"approvalMode":{"$ref":"#/components/schemas/ApprovalMode"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"defaultTtlSeconds":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"Invoice TTL when the request omits ttlSeconds; null uses the merchant default."},"destinationIds":{"description":"Destinations this project may route to. Empty means every merchant destination.","items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},"fixedDestinationId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}]},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"$ref":"#/components/schemas/ProjectKind"},"name":{"type":"string"},"object":{"const":"project","type":"string"},"routingStrategy":{"anyOf":[{"$ref":"#/components/schemas/ProjectRoutingStrategy"},{"type":"null"}],"description":"null inherits the merchant routing strategy."},"status":{"enum":["active","archived"],"type":"string"},"updatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"version":{"description":"Incremented on every change; invoices keep the policy they were created with.","maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["id","object","name","kind","status","defaultTtlSeconds","approvalMode","routingStrategy","fixedDestinationId","destinationIds","version","createdAt","updatedAt"],"type":"object"},"ProjectKind":{"$id":"#/components/schemas/ProjectKind","enum":["website","shop","telegram_bot","social","other"],"type":"string"},"ProjectRoutingStrategy":{"$id":"#/components/schemas/ProjectRoutingStrategy","description":"manual: always the fixedDestinationId (no fallback). random: weighted random among eligible destinations. least_loaded: the eligible destination with the smallest reserved + confirmed amount today (then fewest invoices, then oldest).","enum":["manual","random","least_loaded"],"type":"string"},"PublicInvoice":{"$id":"#/components/schemas/PublicInvoice","properties":{"baseAmountRial":{"$ref":"#/components/schemas/AmountRial","description":"Order amount before the uniqueness offset and buyer fee."},"customerFeeRial":{"description":"Service fee share paid by the buyer (0 when the merchant pays).","maximum":100000000,"minimum":0,"type":"integer"},"description":{"type":["string","null"]},"destination":{"$ref":"#/components/schemas/PaymentDestination"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"merchant":{"properties":{"accentColor":{"type":["string","null"]},"displayName":{"type":"string"},"logoUrl":{"type":["string","null"]},"supportUrl":{"type":["string","null"]}},"required":["displayName","logoUrl","accentColor","supportUrl"],"type":"object"},"offsetRial":{"description":"Small unique offset that identifies this transfer.","maximum":9007199254740991,"minimum":0,"type":"integer"},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"payableAmountRial":{"$ref":"#/components/schemas/AmountRial","description":"The EXACT amount to transfer = base + offset + customer fee."},"publicId":{"type":"string"},"returnUrl":{"description":"Only present once the invoice is paid.","type":["string","null"]},"serverTime":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"status":{"$ref":"#/components/schemas/InvoiceStatus"}},"required":["publicId","status","baseAmountRial","offsetRial","customerFeeRial","payableAmountRial","destination","description","expiresAt","paidAt","returnUrl","merchant","serverTime"],"type":"object"},"PublicPaymentLink":{"$id":"#/components/schemas/PublicPaymentLink","properties":{"amountMode":{"enum":["fixed","open"],"type":"string"},"amountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"available":{"type":"boolean"},"buyerNote":{"properties":{"label":{"type":["string","null"]},"mode":{"enum":["none","optional","required"],"type":"string"}},"required":["mode","label"],"type":"object"},"description":{"type":["string","null"]},"maxAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"merchant":{"properties":{"accentColor":{"type":["string","null"]},"displayName":{"type":"string"},"logoUrl":{"type":["string","null"]},"supportUrl":{"type":["string","null"]}},"required":["displayName","logoUrl","accentColor","supportUrl"],"type":"object"},"minAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"slug":{"description":"Public link identifier: 3–63 lowercase letters, digits and dashes.","pattern":"^[a-z0-9][a-z0-9-]{2,62}$","type":"string"},"title":{"type":"string"},"unavailableReason":{"anyOf":[{"enum":["disabled","expired","exhausted","merchant_inactive"],"type":"string"},{"type":"null"}]}},"required":["slug","title","description","amountMode","amountRial","minAmountRial","maxAmountRial","buyerNote","available","unavailableReason","merchant"],"type":"object"},"PublicPlan":{"$id":"#/components/schemas/PublicPlan","properties":{"code":{"type":"string"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"type":"array"},"includedConfirmations":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"maxDestinations":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"nameFa":{"type":"string"},"periodDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"priceRial":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["code","nameFa","priceRial","includedConfirmations","periodDays","features","maxActiveLinks","maxDestinations"],"type":"object"},"PublicPlanList":{"$id":"#/components/schemas/PublicPlanList","properties":{"data":{"description":"Active, non-example plans, cheapest first; empty until the owner activates one.","items":{"$ref":"#/components/schemas/PublicPlan"},"type":"array"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureInfo"},"type":"array"}},"required":["data","features"],"type":"object"},"RecoveryRequestStatus":{"$id":"#/components/schemas/RecoveryRequestStatus","enum":["pending","approved","rejected"],"type":"string"},"RedeemBrowserChallengeRequest":{"$id":"#/components/schemas/RedeemBrowserChallengeRequest","properties":{"browserSecret":{"maxLength":100,"minLength":20,"type":"string"}},"required":["browserSecret"],"type":"object"},"RedeemGrantCodeRequest":{"$id":"#/components/schemas/RedeemGrantCodeRequest","additionalProperties":false,"properties":{"code":{"description":"The grant code (case, spaces and dashes are ignored).","maxLength":64,"minLength":4,"type":"string"}},"required":["code"],"type":"object"},"RedeemMessengerLinkRequest":{"$id":"#/components/schemas/RedeemMessengerLinkRequest","properties":{"channel":{"$ref":"#/components/schemas/MessengerChannel"},"code":{"maxLength":40,"minLength":6,"type":"string"},"platformUserId":{"description":"The messenger platform's real user id as seen by the bot.","pattern":"^[0-9A-Za-z_-]{1,64}$","type":"string"},"platformUsername":{"maxLength":64,"type":"string"}},"required":["channel","code","platformUserId"],"type":"object"},"RedeemMessengerLinkResult":{"$id":"#/components/schemas/RedeemMessengerLinkResult","properties":{"linkId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"scope":{"$ref":"#/components/schemas/MessengerLinkScope"},"status":{"const":"linked","type":"string"}},"required":["status","linkId","scope"],"type":"object"},"RequestAccountOtpRequest":{"$id":"#/components/schemas/RequestAccountOtpRequest","properties":{"consent":{"const":true,"type":"boolean"},"deviceId":{"description":"Random id kept by the client (never derived from hardware) so per-device limits apply.","pattern":"^[A-Za-z0-9_-]{16,64}$","type":"string"},"phone":{"description":"Iranian mobile number: 09…, 9…, +98…, 0098… (Persian/Arabic digits accepted).","maxLength":40,"minLength":7,"type":"string"}},"required":["phone","consent"],"type":"object"},"RequestPhoneOtpRequest":{"$id":"#/components/schemas/RequestPhoneOtpRequest","properties":{"consent":{"const":true,"description":"The user agreed to receive a verification SMS. Recorded with the challenge.","type":"boolean"},"deviceId":{"description":"Random id kept by the client (never derived from hardware) so per-device limits apply.","pattern":"^[A-Za-z0-9_-]{16,64}$","type":"string"},"phone":{"description":"Iranian mobile number: 09…, 9…, +98…, 0098… (Persian/Arabic digits accepted).","maxLength":40,"minLength":7,"type":"string"},"purpose":{"default":"sign_in","description":"`sign_in` signs in or creates the account (the server decides sign-up vs sign-in internally). `recover_account` also revokes other sessions and starts the 72 h hold.","enum":["sign_in","recover_account"],"type":"string"}},"required":["phone","consent"],"type":"object"},"RequestStepUpOtpRequest":{"$id":"#/components/schemas/RequestStepUpOtpRequest","properties":{"consent":{"const":true,"type":"boolean"},"deviceId":{"description":"Random id kept by the client (never derived from hardware) so per-device limits apply.","pattern":"^[A-Za-z0-9_-]{16,64}$","type":"string"}},"required":["consent"],"type":"object"},"ResolveDepositRequest":{"$id":"#/components/schemas/ResolveDepositRequest","oneOf":[{"properties":{"action":{"const":"confirm","type":"string"},"invoiceId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["action","invoiceId","reason"],"type":"object"},{"properties":{"action":{"const":"reject","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["action","reason"],"type":"object"}]},"RevokeMerchantCredentialsRequest":{"$id":"#/components/schemas/RevokeMerchantCredentialsRequest","properties":{"apiKeys":{"default":false,"type":"boolean"},"devices":{"default":false,"type":"boolean"},"memberSessions":{"default":false,"description":"Revokes ALL sessions of the merchant's active members (they may belong to other merchants too).","type":"boolean"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"RevokedCredentials":{"$id":"#/components/schemas/RevokedCredentials","properties":{"apiKeysRevoked":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"devicesRevoked":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"sessionsRevoked":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["apiKeysRevoked","devicesRevoked","sessionsRevoked"],"type":"object"},"RialString":{"$id":"#/components/schemas/RialString","description":"Exact integer rial as a decimal string. Used for aggregates, which may exceed the JavaScript safe-integer range.","pattern":"^-?[0-9]{1,24}$","type":"string"},"Role":{"$id":"#/components/schemas/Role","enum":["owner","admin","finance","developer","support","readonly","restricted"],"type":"string"},"RollbackSettingRequest":{"$id":"#/components/schemas/RollbackSettingRequest","properties":{"confirmKey":{"maxLength":80,"type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"version":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["reason"],"type":"object"},"RotatePartnerSecretRequest":{"$id":"#/components/schemas/RotatePartnerSecretRequest","additionalProperties":false,"properties":{"graceHours":{"default":0,"description":"Hours the previous secret stays valid (0 = immediately invalid, e.g. after a leak).","maximum":72,"minimum":0,"type":"integer"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"RotateWebhookSecretRequest":{"$id":"#/components/schemas/RotateWebhookSecretRequest","properties":{"overlapSeconds":{"default":86400,"description":"How long deliveries are ALSO signed with the old secret (a second v1= value), so receivers can switch without downtime. 0 = stop using the old secret immediately.","maximum":259200,"minimum":0,"type":"integer"}},"type":"object"},"RotatedWebhookSecret":{"$id":"#/components/schemas/RotatedWebhookSecret","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"previousSecretExpiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"Until when the old secret still signs deliveries; null when overlapSeconds = 0."},"secret":{"description":"New signing secret (whsec_…), shown once.","type":"string"}},"required":["endpoint","secret","previousSecretExpiresAt"],"type":"object"},"RoutingEligibility":{"$id":"#/components/schemas/RoutingEligibility","properties":{"eligibleDestinationIds":{"description":"Preference order of the strategy (random strategies vary between calls).","items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":"array"},"evaluatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"ineligibleDestinations":{"items":{"$ref":"#/components/schemas/DestinationIneligibility"},"type":"array"},"strategy":{"enum":["manual","random","round_robin","least_success","health","least_loaded"],"type":"string"}},"required":["strategy","evaluatedAt","eligibleDestinationIds","ineligibleDestinations"],"type":"object"},"RoutingEligibilityRequest":{"$id":"#/components/schemas/RoutingEligibilityRequest","properties":{"amountRial":{"$ref":"#/components/schemas/AmountRial","description":"Amount to check, before the uniqueness offset."},"projectId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["amountRial"],"type":"object"},"SecuritySummary":{"$id":"#/components/schemas/SecuritySummary","properties":{"availability":{"properties":{"baleLinks":{"type":"boolean"},"phoneSignIn":{"type":"boolean"},"telegramLinks":{"type":"boolean"},"telegramSignIn":{"type":"boolean"}},"required":["phoneSignIn","telegramSignIn","telegramLinks","baleLinks"],"type":"object"},"hasTelegramIdentity":{"type":"boolean"},"phone":{"anyOf":[{"$ref":"#/components/schemas/PhoneSummary"},{"type":"null"}]},"phoneRequired":{"description":"true for accounts that have no verified number yet (e.g. Telegram-only accounts).","type":"boolean"},"sensitiveHold":{"anyOf":[{"properties":{"reason":{"enum":["phone_changed","account_recovered"],"type":"string"},"until":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["until","reason"],"type":"object"},{"type":"null"}]},"stepUp":{"properties":{"authenticatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"fresh":{"type":"boolean"},"freshUntil":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["authenticatedAt","fresh","freshUntil"],"type":"object"}},"required":["phone","phoneRequired","hasTelegramIdentity","sensitiveHold","stepUp","availability"],"type":"object"},"SessionGrant":{"$id":"#/components/schemas/SessionGrant","properties":{"csrfToken":{"type":"string"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"me":{"$ref":"#/components/schemas/Me"},"token":{"description":"Bearer token for the Mini App. Browser sessions receive an HttpOnly cookie instead (token omitted).","type":"string"}},"required":["expiresAt","me"],"type":"object"},"SessionInfo":{"$id":"#/components/schemas/SessionInfo","properties":{"authMethod":{"anyOf":[{"enum":["telegram_miniapp","telegram_browser","phone_otp","phone_recovery","telegram_android"],"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"current":{"type":"boolean"},"device":{"description":"Short browser/OS summary from the user agent (never the raw string).","type":["string","null"]},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"enum":["web","miniapp","android"],"type":"string"},"lastSeenAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","kind","authMethod","createdAt","lastSeenAt","expiresAt","device","current"],"type":"object"},"SetBankPolicyRequest":{"$id":"#/components/schemas/SetBankPolicyRequest","properties":{"evidenceNote":{"description":"REQUIRED for verified: which real, redacted bank samples were validated (count, period, devices). Synthetic fixtures never justify verified. Optional otherwise (the reason is stored).","maxLength":2000,"minLength":20,"type":"string"},"pilotMerchantIds":{"description":"pilot only: limit the pilot to these merchants. Omit for every merchant.","items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":1000,"minItems":1,"type":"array"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"status":{"enum":["experimental","pilot","verified"],"type":"string"}},"required":["status","reason"],"type":"object"},"SetNotificationPreferenceRequest":{"$id":"#/components/schemas/SetNotificationPreferenceRequest","properties":{"channel":{"$ref":"#/components/schemas/NotifyChannel"},"enabled":{"type":"boolean"},"eventType":{"$ref":"#/components/schemas/NotifyEvent"},"merchantId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["merchantId","eventType","channel","enabled"],"type":"object"},"SetProjectDestinationsRequest":{"$id":"#/components/schemas/SetProjectDestinationsRequest","properties":{"destinationIds":{"items":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxItems":50,"type":"array"}},"required":["destinationIds"],"type":"object"},"SetSettingRequest":{"$id":"#/components/schemas/SetSettingRequest","properties":{"confirmKey":{"description":"Secrets only: type the setting key to confirm.","maxLength":80,"type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"value":{"anyOf":[{"maxLength":4096,"type":"string"},{"type":"boolean"},{"type":"number"},{"items":{"maxLength":500,"type":"string"},"maxItems":50,"type":"array"}],"description":"Secrets: a non-empty string. An empty value is refused and NEVER clears a stored value; use the clear action."}},"required":["value","reason"],"type":"object"},"SettingHistoryEntry":{"$id":"#/components/schemas/SettingHistoryEntry","properties":{"action":{"enum":["current","previous"],"type":"string"},"changedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"changedBy":{"anyOf":[{"properties":{"displayName":{"type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName"],"type":"object"},{"type":"null"}]},"current":{"type":"boolean"},"reason":{"type":["string","null"]},"version":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["version","action","changedAt","changedBy","reason","current"],"type":"object"},"SettingSource":{"$id":"#/components/schemas/SettingSource","description":"Where the effective value comes from: a managed value overrides the environment fallback; \"default\" is the built-in value used when neither exists.","enum":["managed","environment","default","unset"],"type":"string"},"SettingState":{"$id":"#/components/schemas/SettingState","properties":{"canTest":{"type":"boolean"},"configured":{"type":"boolean"},"descriptionFa":{"type":"string"},"group":{"type":"string"},"hint":{"description":"Last 4 characters, only for keys that allow it.","type":["string","null"]},"hintAllowed":{"type":"boolean"},"key":{"type":"string"},"kind":{"$ref":"#/components/schemas/SettingValueKind"},"needsRestart":{"type":"boolean"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"pendingRestart":{"type":"boolean"},"readable":{"description":"false when a stored secret cannot be decrypted with the current SETTINGS_MASTER_KEY: re-enter it.","type":"boolean"},"requiredRole":{"enum":["platform_owner","platform_operator"],"type":"string"},"rollbackVersions":{"items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"secret":{"type":"boolean"},"source":{"$ref":"#/components/schemas/SettingSource"},"updatedAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"updatedBy":{"anyOf":[{"properties":{"displayName":{"type":"string"},"userId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["userId","displayName"],"type":"object"},{"type":"null"}]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"items":{"type":"string"},"type":"array"}]},{"type":"null"}],"description":"Non-secret managed value; always null for secrets."},"version":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]}},"required":["key","group","descriptionFa","kind","secret","requiredRole","canTest","needsRestart","hintAllowed","options","configured","source","readable","value","hint","version","updatedAt","updatedBy","pendingRestart","rollbackVersions"],"type":"object"},"SettingTestResult":{"$id":"#/components/schemas/SettingTestResult","properties":{"category":{"anyOf":[{"enum":["unauthorized","unreachable","invalid_format","not_configured","unsupported","needs_messages","needs_page_origin","probe_started","no_new_message","inconclusive"],"type":"string"},{"type":"null"}]},"result":{"enum":["ok","failed"],"type":"string"},"suggestion":{"description":"Live checks only (DICEX_PAGE_INDEX_ORIGIN, DICEX_TIME_MODE): the value the read-only check detected. Never saved by the test; the owner saves it.","type":["string","null"]},"testedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["result","category","suggestion","testedAt"],"type":"object"},"SettingValueKind":{"$id":"#/components/schemas/SettingValueKind","enum":["string","boolean","url","url_list","enum","number"],"type":"string"},"SettingsList":{"$id":"#/components/schemas/SettingsList","properties":{"data":{"items":{"$ref":"#/components/schemas/SettingState"},"type":"array"},"enabled":{"type":"boolean"},"masterKey":{"properties":{"canaryOk":{"type":["boolean","null"]},"configured":{"type":"boolean"}},"required":["configured","canaryOk"],"type":"object"},"serverOnly":{"description":"Non-secret values only the server operator sets in the environment file; shown read-only so the console can explain what is still missing.","properties":{"dicexPageIndexOriginConfigured":{"description":"DICEX_PAGE_INDEX_ORIGIN is set (0 or 1, verified against the live DiceX API). The DiceX poller stays off until it is.","type":"boolean"},"dicexTimeMode":{"description":"DICEX_TIME_MODE: how offset-less provider timestamps are read.","enum":["utc","tehran","offset","unverified"],"type":"string"}},"required":["dicexPageIndexOriginConfigured","dicexTimeMode"],"type":"object"},"signIn":{"description":"Sign-in migration readiness (ADR 0013). Read-only here; flags change in the server environment.","properties":{"activeOwners":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"ownersWithVerifiedPhone":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"phoneEnabled":{"type":"boolean"},"telegramEnabled":{"type":"boolean"},"telegramOnlyAccounts":{"description":"Accounts that still have no verified number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"telegramSwitchReady":{"description":"true when every active platform owner has a verified number, so switching Telegram sign-in off cannot lock an owner out.","type":"boolean"}},"required":["phoneEnabled","telegramEnabled","activeOwners","ownersWithVerifiedPhone","telegramSwitchReady","telegramOnlyAccounts"],"type":"object"},"stepUp":{"properties":{"fresh":{"type":"boolean"},"freshUntil":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["fresh","freshUntil"],"type":"object"}},"required":["enabled","masterKey","stepUp","signIn","serverOnly","data"],"type":"object"},"StartPaymentLinkRequest":{"$id":"#/components/schemas/StartPaymentLinkRequest","properties":{"amountRial":{"$ref":"#/components/schemas/AmountRial","description":"Required for open links (between min and max); must be omitted for fixed links."},"buyerNote":{"description":"Plain text (no control characters or angle brackets), stored for the merchant only. A note that looks like a card number (16+ digits), an IR IBAN, or is only a 4–8 digit code is rejected with 422 buyer_note_sensitive (Persian/Arabic digits and separators are normalised first).","maxLength":200,"minLength":1,"pattern":"^[^\\p{Cc}\\p{Cf}<>]*$","type":"string"}},"type":"object"},"StartedPaymentLink":{"$id":"#/components/schemas/StartedPaymentLink","properties":{"checkoutUrl":{"format":"uri","type":"string"},"invoice":{"$ref":"#/components/schemas/PublicInvoice"}},"required":["checkoutUrl","invoice"],"type":"object"},"StepUpResult":{"$id":"#/components/schemas/StepUpResult","properties":{"authenticatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"freshUntil":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["authenticatedAt","freshUntil"],"type":"object"},"TrustDepositSenderResult":{"$id":"#/components/schemas/TrustDepositSenderResult","properties":{"alreadyTrusted":{"type":"boolean"},"bankCode":{"type":"string"},"deposit":{"$ref":"#/components/schemas/Deposit"},"outcome":{"description":"Result of re-running the unchanged matching rules on this deposit: matched (auto-confirmed now), review (another rule still needs a human; see deposit.reviewReason) or unchanged.","enum":["matched","review","unchanged"],"type":"string"},"reevaluatedDeposits":{"description":"Other deposits from the same sender that were re-evaluated as well.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"sender":{"description":"The sender id added to (or already on) the merchant approved-sender list.","type":"string"}},"required":["sender","bankCode","alreadyTrusted","deposit","outcome","reevaluatedDeposits"],"type":"object"},"UnverifiedSender":{"$id":"#/components/schemas/UnverifiedSender","properties":{"blockedReason":{"anyOf":[{"enum":["personal_mobile","invalid_sender","unknown_bank"],"type":"string"},{"type":"null"}]},"sender":{"description":"Sender id as recorded; a personal mobile number is masked (e.g. 0912***4567). Null when the message had none.","type":["string","null"]},"trustable":{"description":"Whether trustDepositSender can approve this sender for the deposit bank.","type":"boolean"}},"required":["sender","trustable","blockedReason"],"type":"object"},"UpdateDestinationCapacityRequest":{"$id":"#/components/schemas/UpdateDestinationCapacityRequest","properties":{"dailyAmountLimitRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"dailyCountLimit":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}]},"enabled":{"type":"boolean"},"healthPausePolicy":{"enum":["off","android_relay"],"type":"string"},"maxInvoiceAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"minInvoiceAmountRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"monthlyAmountLimitRial":{"anyOf":[{"maximum":100000000000000,"minimum":1,"type":"integer"},{"type":"null"}]},"schedule":{"anyOf":[{"$ref":"#/components/schemas/DestinationSchedule"},{"type":"null"}]}},"type":"object"},"UpdateDestinationRequest":{"$id":"#/components/schemas/UpdateDestinationRequest","properties":{"dailyLimitRial":{"anyOf":[{"$ref":"#/components/schemas/AmountRial"},{"type":"null"}]},"label":{"maxLength":80,"minLength":1,"type":"string"},"smsAccountHints":{"items":{"pattern":"^[0-9*]{2,26}$","type":"string"},"maxItems":10,"type":"array"},"status":{"enum":["active","paused","archived"],"type":"string"},"weight":{"maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"UpdateMerchantRequest":{"$id":"#/components/schemas/UpdateMerchantRequest","properties":{"branding":{"properties":{"accentColor":{"pattern":"^#[0-9a-fA-F]{6}$","type":"string"},"displayName":{"maxLength":80,"minLength":1,"type":"string"},"supportTelegram":{"pattern":"^@?[A-Za-z0-9_]{5,32}$","type":"string"},"supportUrl":{"format":"uri","maxLength":500,"type":"string"}},"type":"object"},"forwarderAutoConfirm":{"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"routingStrategy":{"enum":["manual","random","round_robin","least_success","health","least_loaded"],"type":"string"},"smsSenderAllowlist":{"items":{"maxLength":32,"minLength":2,"pattern":"^[\\p{L}\\p{N}+ ._-]+$","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"UpdateMessengerLinkScopeRequest":{"$id":"#/components/schemas/UpdateMessengerLinkScopeRequest","properties":{"notifyScope":{"$ref":"#/components/schemas/MessengerScopeIds","description":"Which merchants / projects / cards this link is notified about. Empty arrays = no restriction."},"reviewScope":{"anyOf":[{"$ref":"#/components/schemas/MessengerScopeIds"},{"type":"null"}],"description":"Grants approve/reject buttons for these merchants/projects/cards (needs step-up and the deposits.review role); null = notifications only."}},"type":"object"},"UpdatePartnerRequest":{"$id":"#/components/schemas/UpdatePartnerRequest","additionalProperties":false,"properties":{"ipAllowlist":{"items":{"description":"IPv4/IPv6 address or CIDR network (e.g. 203.0.113.0/24, 2001:db8::/32).","examples":["203.0.113.10/32"],"maxLength":49,"minLength":2,"pattern":"^[0-9A-Fa-f:.]+(\\/[0-9]{1,3})?$","type":"string"},"maxItems":20,"minItems":1,"type":"array"},"name":{"maxLength":80,"minLength":1,"type":"string"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"scopes":{"items":{"$ref":"#/components/schemas/PartnerScope"},"maxItems":2,"minItems":1,"type":"array"},"status":{"enum":["active","disabled"],"type":"string"}},"required":["reason"],"type":"object"},"UpdatePaymentLinkRequest":{"$id":"#/components/schemas/UpdatePaymentLinkRequest","description":"Amounts, slug and mode are immutable: create a new link instead. Existing attempts keep their own snapshot.","properties":{"buyerNoteLabel":{"anyOf":[{"maxLength":80,"minLength":1,"type":"string"},{"type":"null"}],"description":"Must not ask buyers for card numbers, IBAN, passwords/PIN, CVV2 or one-time codes (Persian or English terms); otherwise 422 buyer_note_label_sensitive."},"buyerNoteMode":{"enum":["none","optional","required"],"type":"string"},"description":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"maxUses":{"anyOf":[{"maximum":1000000,"minimum":1,"type":"integer"},{"type":"null"}]},"status":{"description":"disabled stops NEW attempts; existing attempts stay payable and reconcilable.","enum":["active","disabled"],"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"ttlSeconds":{"anyOf":[{"maximum":86400,"minimum":300,"type":"integer"},{"type":"null"}]}},"type":"object"},"UpdatePlanRequest":{"$id":"#/components/schemas/UpdatePlanRequest","additionalProperties":false,"properties":{"active":{"type":"boolean"},"features":{"items":{"$ref":"#/components/schemas/PlanFeatureCode"},"maxItems":15,"type":"array"},"includedConfirmations":{"maximum":10000000,"minimum":0,"type":"integer"},"maxActiveLinks":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"description":"null = no commercial limit (technical limits still apply)."},"maxDestinations":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"description":"null = no commercial limit (technical limits still apply)."},"nameFa":{"maxLength":60,"minLength":2,"type":"string"},"periodDays":{"maximum":366,"minimum":1,"type":"integer"},"priceRial":{"description":"Plan price in integer rial (toman = rial / 10, display only).","maximum":1000000000000,"minimum":1,"type":"integer"},"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"},"UpdatePlatformStaffRequest":{"$id":"#/components/schemas/UpdatePlatformStaffRequest","properties":{"reason":{"description":"Required human-readable justification; stored in the audit log.","maxLength":500,"minLength":3,"type":"string"},"role":{"$ref":"#/components/schemas/PlatformRole"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["reason"],"type":"object"},"UpdateProjectRequest":{"$id":"#/components/schemas/UpdateProjectRequest","properties":{"approvalMode":{"$ref":"#/components/schemas/ApprovalMode"},"defaultTtlSeconds":{"anyOf":[{"maximum":86400,"minimum":300,"type":"integer"},{"type":"null"}]},"fixedDestinationId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Required with routingStrategy = manual, otherwise must be null."},"kind":{"$ref":"#/components/schemas/ProjectKind"},"name":{"maxLength":80,"minLength":1,"type":"string"},"routingStrategy":{"anyOf":[{"$ref":"#/components/schemas/ProjectRoutingStrategy"},{"type":"null"}]},"status":{"enum":["active","archived"],"type":"string"}},"type":"object"},"VerifiedInvoice":{"$id":"#/components/schemas/VerifiedInvoice","properties":{"approvalMode":{"description":"Approval policy snapshot taken at creation. manual_review: matched evidence always waits for a human decision.","enum":["automatic","manual_review"],"type":"string"},"attempt":{"description":"Attempt number among invoices with the same orderRef and mode (1 for the first or when orderRef is null).","maximum":9007199254740991,"minimum":1,"type":"integer"},"baseAmountRial":{"$ref":"#/components/schemas/AmountRial"},"cancelledAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"checkoutUrl":{"format":"uri","type":"string"},"confirmation":{"anyOf":[{"$ref":"#/components/schemas/InvoiceConfirmation"},{"type":"null"}]},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"currency":{"const":"IRR","type":"string"},"customerFeeRial":{"maximum":100000000,"minimum":0,"type":"integer"},"customerRef":{"type":["string","null"]},"description":{"type":["string","null"]},"destination":{"$ref":"#/components/schemas/PaymentDestination"},"expiresAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"merchantFeeRial":{"description":"PAYNYX service charge debited from service credit on confirmation.","maximum":100000000,"minimum":0,"type":"integer"},"metadata":{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"},"object":{"const":"invoice","type":"string"},"offsetRial":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"orderRef":{"type":["string","null"]},"paidAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"payableAmountRial":{"$ref":"#/components/schemas/AmountRial","description":"The EXACT amount the buyer must transfer, in rial."},"previousInvoiceId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Previous attempt for the same orderRef, if any. Earlier attempts keep their own id and history."},"projectId":{"anyOf":[{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},{"type":"null"}],"description":"Project the invoice belongs to, if any."},"publicId":{"type":"string"},"returnUrl":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"verification":{"$ref":"#/components/schemas/InvoiceVerification"}},"required":["id","object","publicId","status","baseAmountRial","customerFeeRial","offsetRial","payableAmountRial","merchantFeeRial","currency","destination","orderRef","attempt","previousInvoiceId","customerRef","description","metadata","checkoutUrl","returnUrl","expiresAt","paidAt","cancelledAt","confirmation","projectId","approvalMode","createdAt","verification"],"type":"object"},"VerifyOtpRequest":{"$id":"#/components/schemas/VerifyOtpRequest","properties":{"challengeId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"code":{"maxLength":10,"minLength":4,"pattern":"^[0-9٠-٩۰-۹]+$","type":"string"}},"required":["challengeId","code"],"type":"object"},"WebhookDelivery":{"$id":"#/components/schemas/WebhookDelivery","properties":{"attemptCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"endpointId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"eventCreatedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"eventId":{"description":"Stable business event id (the paynyx-event-id header). A replay re-sends the same id.","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"eventType":{"$ref":"#/components/schemas/WebhookEventType"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"lastAttemptAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"lastError":{"description":"Short transport error (e.g. \"HTTP 500\", \"timeout\"); never contains the payload or secrets.","type":["string","null"]},"lastStatusCode":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"nextAttemptAt":{"anyOf":[{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}],"description":"Next scheduled attempt for pending/failed deliveries."},"status":{"enum":["pending","succeeded","failed","dead"],"type":"string"}},"required":["id","endpointId","eventId","eventType","status","attemptCount","lastAttemptAt","lastStatusCode","lastError","nextAttemptAt","eventCreatedAt"],"type":"object"},"WebhookDeliveryPage":{"$id":"#/components/schemas/WebhookDeliveryPage","properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"type":"object"},"WebhookEndpoint":{"$id":"#/components/schemas/WebhookEndpoint","properties":{"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"description":{"type":["string","null"]},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"status":{"enum":["active","disabled"],"type":"string"},"url":{"type":"string"}},"required":["id","url","eventTypes","status","description","createdAt"],"type":"object"},"WebhookEvent":{"$id":"#/components/schemas/WebhookEvent","properties":{"apiVersion":{"const":"2026-10-08","type":"string"},"createdAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"data":{"$ref":"#/components/schemas/WebhookEventData"},"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"$ref":"#/components/schemas/WebhookEventType"}},"required":["id","type","apiVersion","createdAt","data"],"type":"object"},"WebhookEventData":{"$id":"#/components/schemas/WebhookEventData","properties":{"credit":{"description":"credit.low: balance versus threshold.","properties":{"availableRial":{"description":"Available service credit in rial (reservations excluded); may be negative.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"thresholdRial":{"description":"The low-credit threshold in rial that was crossed.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["availableRial","thresholdRial"],"type":"object"},"deposit":{"$ref":"#/components/schemas/Deposit","description":"deposit.unmatched: the deposit that matched no open invoice (masked fields only, no SMS text)."},"device":{"description":"device.degraded: the relay device.","properties":{"id":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"name":{"type":"string"},"shortId":{"type":"string"}},"required":["id","shortId","name"],"type":"object"},"invoice":{"$ref":"#/components/schemas/Invoice","description":"invoice.paid, invoice.review_required, invoice.expired, invoice.cancelled."},"reason":{"$ref":"#/components/schemas/DeviceDegradedReason","description":"device.degraded: why the device is offline or degraded."},"since":{"description":"device.degraded: when the transition was detected.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"type":"object"},"WebhookEventType":{"$id":"#/components/schemas/WebhookEventType","enum":["invoice.paid","invoice.review_required","invoice.expired","invoice.cancelled","deposit.unmatched","device.degraded","credit.low"],"type":"string"},"WebhookTestFailure":{"$id":"#/components/schemas/WebhookTestFailure","description":"Why the test was not acknowledged: timeout, dns (name not resolved), connection (refused/reset), tls (certificate or handshake), blocked_destination (private or disallowed address) or http_status (answered with a non-2xx status).","enum":["timeout","dns","connection","tls","blocked_destination","http_status"],"type":"string"},"WebhookTestResult":{"$id":"#/components/schemas/WebhookTestResult","properties":{"failure":{"anyOf":[{"$ref":"#/components/schemas/WebhookTestFailure"},{"type":"null"}]},"httpStatus":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}],"description":"HTTP status the endpoint answered with; null when no response arrived."},"latencyMs":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"ok":{"description":"true when the endpoint answered the signed test event with a 2xx status.","type":"boolean"},"testedAt":{"description":"ISO-8601 UTC timestamp.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["ok","httpStatus","latencyMs","failure","testedAt"],"type":"object"},"Weekday":{"$id":"#/components/schemas/Weekday","enum":["sat","sun","mon","tue","wed","thu","fri"],"type":"string"}},"securitySchemes":{"apiKey":{"description":"Merchant API key (pk_live_…). Server-side only — never expose it in browser or mobile code.","scheme":"bearer","type":"http"},"device":{"description":"HMAC-signed device request; see docs/paynyx/integrations/device-api.md.","in":"header","name":"X-Paynyx-Signature","type":"apiKey"},"forwarderKey":{"description":"Forwarder key secret (shown once), for third-party SMS forwarders and iPhone Shortcuts; see docs/paynyx/integrations/forwarders.md. Lower assurance than a paired device.","scheme":"bearer","type":"http"},"iosShortcutCode":{"description":"iPhone connection code (`pnxi_…`, shown once) of a forwarder key with format `ios-shortcut.v1`; it carries the key id and the secret in one string and is sent only in the Authorization header. See docs/paynyx/integrations/iphone-shortcuts.md.","scheme":"bearer","type":"http"},"partner":{"description":"Partner server-to-server request (admin-created partner): X-Paynyx-Partner key id, X-Paynyx-Timestamp, single-use X-Paynyx-Nonce and X-Paynyx-Signature = hex(HMAC-SHA256(secret, timestamp.nonce.METHOD.path.sha256hex(rawBody))); the caller IP must be on the partner allowlist. See docs/paynyx/superpowers/specs/2026-10-20-partner-grant-codes-design.md (Appendix A).","in":"header","name":"X-Paynyx-Signature","type":"apiKey"},"service":{"description":"Internal service credential (bot → API).","scheme":"bearer","type":"http"},"session":{"description":"Dashboard session. Browsers use an HttpOnly cookie plus the X-CSRF-Token header; the Telegram Mini App uses a bearer token.","scheme":"bearer","type":"http"}}},"info":{"description":"PAYNYX (a NYXON.TECH product) reconciles merchant bank deposits with invoices. Money is always integer rial (fields end in `Rial`). PAYNYX never holds funds.","title":"PAYNYX API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v1/admin/audit-log":{"get":{"operationId":"adminListAuditLog","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"action","required":false,"schema":{"maxLength":100,"type":"string"}},{"in":"query","name":"actorUserId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"targetId","required":false,"schema":{"maxLength":100,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAuditPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Platform admin audit log (owner only)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/banks":{"get":{"operationId":"adminListBankPolicies","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBankPolicyList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Bank validation policies with parser rule coverage (no raw samples)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/banks/{bankCode}/changes":{"get":{"operationId":"adminListBankPolicyChanges","parameters":[{"in":"path","name":"bankCode","required":true,"schema":{"pattern":"^[a-z][a-z0-9_]{1,31}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBankPolicyChangePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Append-only change history of a bank policy, newest first","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/banks/{bankCode}/policy":{"post":{"description":"Requires admin.banks.manage (owner only) and a recent login. verified requires an evidence note describing real, redacted bank samples; synthetic fixtures never justify verified. Writes bank_policy_changes and the platform audit log in one transaction.","operationId":"adminSetBankPolicy","parameters":[{"in":"path","name":"bankCode","required":true,"schema":{"pattern":"^[a-z][a-z0-9_]{1,31}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBankPolicyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBankPolicy"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required."}},"security":[{"session":[]}],"summary":"Set a bank's live auto-confirmation policy (owner, step-up, audited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required"]}},"/v1/admin/deposits":{"get":{"operationId":"adminListDeposits","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["unmatched","matched","review","ignored","duplicate"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDepositPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Parsed deposits and review queue (masked; never raw SMS)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/deposits/{depositId}/decision":{"post":{"description":"Requires admin.deposits.resolve (owner, operator) and a recent login. Uses the same transactional path as merchant manual resolution: exact payable amount, same merchant, same destination, one deposit per invoice, one fee. Rejecting keeps the deposit and its evidence.","operationId":"adminDecideDeposit","parameters":[{"in":"path","name":"depositId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDepositDecisionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDepositDecision"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, invalid_state, amount_mismatch, merchant_mismatch, destination_mismatch, insufficient_credit."}},"security":[{"session":[]}],"summary":"Manually confirm a review/unmatched deposit to one invoice of the same merchant, or reject it (step-up, audited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","invalid_state","amount_mismatch","merchant_mismatch","destination_mismatch","insufficient_credit"]}},"/v1/admin/devices":{"get":{"operationId":"adminListDevices","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDevicePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Relay devices with heartbeat age, app version and channels","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/exports/invoices":{"get":{"description":"Requires admin.exports.invoices (owner, finance). At most 92 days and 50,000 rows (otherwise 422 export_too_large). Responds with Content-Disposition: attachment (unpredictable file name) and Cache-Control: no-store.","operationId":"adminExportInvoices","parameters":[{"in":"query","name":"from","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/InvoiceStatus"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, export_too_large."}},"security":[{"session":[]}],"summary":"Bounded CSV export of invoices created in a Tehran-day range (audited, rate-limited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","export_too_large"]}},"/v1/admin/exports/ledger-entries":{"get":{"description":"Requires admin.exports.ledger (owner, finance). Same bounds and headers as the invoice export.","operationId":"adminExportLedgerEntries","parameters":[{"in":"query","name":"from","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, export_too_large."}},"security":[{"session":[]}],"summary":"Bounded CSV export of ledger postings in a Tehran-day range (audited, rate-limited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","export_too_large"]}},"/v1/admin/grant-codes":{"get":{"operationId":"adminListGrantCodes","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"kind","required":false,"schema":{"$ref":"#/components/schemas/GrantCodeKind"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/GrantCodeStatus"}},{"in":"query","name":"issuerType","required":false,"schema":{"enum":["admin","partner"],"type":"string"}},{"in":"query","name":"partnerId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantCodePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Grant and discount codes (last 4 characters only), newest first","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]},"post":{"operationId":"adminCreateGrantCode","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminGrantCodeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantCodeCreated"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, plan_not_found, invalid_cidr."}},"security":[{"session":[]}],"summary":"Create a grant or discount code manually; the code is shown once (step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","plan_not_found","invalid_cidr"]}},"/v1/admin/grant-codes/{codeId}/revoke":{"post":{"operationId":"adminRevokeGrantCode","parameters":[{"in":"path","name":"codeId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerRevokeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantCode"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required."}},"security":[{"session":[]}],"summary":"Revoke a code and every grant made from it (step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required"]}},"/v1/admin/grants":{"get":{"operationId":"adminListMerchantGrants","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"codeId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/MerchantGrantStatus"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantGrantPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Merchant grants with usage, newest first","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/grants/{grantId}/revoke":{"post":{"operationId":"adminRevokeMerchantGrant","parameters":[{"in":"path","name":"grantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerRevokeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantGrant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required."}},"security":[{"session":[]}],"summary":"Revoke one merchant grant (future confirmations bill normally; step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required"]}},"/v1/admin/health":{"get":{"description":"Requires admin.health.read (owner, operator, support). No provider or paid call is made.","operationId":"adminGetOperationalHealth","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOperationalHealth"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Worker/outbox backlog, webhook dead letters, ingestion backlog and DiceX checkpoint age (read-only)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/invoices":{"get":{"operationId":"adminListInvoices","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/InvoiceStatus"}},{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvoicePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Invoices across merchants (filter by merchant, status, mode, created range)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/ledger/balances":{"get":{"operationId":"adminListMerchantBalances","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantBalancePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Per-merchant available and reserved service credit","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/ledger/entries":{"get":{"operationId":"adminListLedgerEntries","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLedgerEntryPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Ledger postings, newest first","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/ledger/totals":{"get":{"operationId":"adminGetLedgerTotals","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLedgerTotals"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Platform ledger totals and balance check","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/me":{"get":{"operationId":"adminGetMe","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMe"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Current platform staff member, role, permissions and step-up freshness","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/merchants":{"get":{"operationId":"adminListMerchants","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","suspended","closed"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Search merchants with credit balances","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/merchants/{merchantId}":{"get":{"operationId":"adminGetMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantDetail"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Merchant detail: members, masked destinations, credit, invoices, devices, webhook health","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/merchants/{merchantId}/credit-adjustments":{"post":{"description":"Requires admin.ledger.adjust (owner, finance) and a recent login. Debits only consume AVAILABLE credit. Reusing an Idempotency-Key with the same body returns the original result; with a different body it fails with idempotency_conflict.","operationId":"adminCreateCreditAdjustment","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustmentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustment"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, insufficient_credit, idempotency_conflict."}},"security":[{"session":[]}],"summary":"Adjust service credit through a balanced, immutable ledger transaction (step-up, idempotent)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","insufficient_credit","idempotency_conflict"]}},"/v1/admin/merchants/{merchantId}/credit-adjustments/preview":{"post":{"operationId":"adminPreviewCreditAdjustment","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustmentPreview"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Preview a service-credit adjustment (no changes)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/merchants/{merchantId}/reactivate":{"post":{"operationId":"adminReactivateMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantModeration"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, invalid_state."}},"security":[{"session":[]}],"summary":"Reactivate a suspended merchant","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","invalid_state"]}},"/v1/admin/merchants/{merchantId}/revoke-credentials":{"post":{"operationId":"adminRevokeMerchantCredentials","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeMerchantCredentialsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokedCredentials"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Revoke a merchant's API keys, relay devices and/or member sessions (history is kept)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/merchants/{merchantId}/suspend":{"post":{"operationId":"adminSuspendMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMerchantModeration"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, invalid_state."}},"security":[{"session":[]}],"summary":"Suspend a merchant: new invoices are refused; received evidence is still recorded","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","invalid_state"]}},"/v1/admin/overview":{"get":{"description":"Requires admin.overview.read (all staff roles). Range is at most 366 days.","operationId":"adminGetOverview","parameters":[{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverview"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Server-aggregated platform metrics and daily series (Tehran business days)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/overview/analytics":{"get":{"description":"Requires admin.overview.read. Server-side SQL over Tehran business days. See docs/paynyx/operations/admin-metrics.md.","operationId":"adminGetOverviewAnalytics","parameters":[{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"top","required":false,"schema":{"default":10,"maximum":20,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverviewAnalytics"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Previous-interval comparison, top merchants, bank/channel distribution, confirmation ratio and latency percentiles","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/partners":{"get":{"operationId":"adminListPartners","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPartnerList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Partners (key id, allowlist, status; never secrets)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]},"post":{"operationId":"adminCreatePartner","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPartnerSecret"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, invalid_cidr."}},"security":[{"session":[]}],"summary":"Create a partner; the HMAC secret is shown once (step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","invalid_cidr"]}},"/v1/admin/partners/{partnerId}":{"patch":{"operationId":"adminUpdatePartner","parameters":[{"in":"path","name":"partnerId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPartner"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, invalid_cidr."}},"security":[{"session":[]}],"summary":"Rename, edit the IP allowlist or scopes, disable or re-enable a partner (step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","invalid_cidr"]}},"/v1/admin/partners/{partnerId}/rotate-secret":{"post":{"operationId":"adminRotatePartnerSecret","parameters":[{"in":"path","name":"partnerId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatePartnerSecretRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPartnerSecret"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required."}},"security":[{"session":[]}],"summary":"Issue a new partner secret, shown once (step-up); optional grace period for the previous one","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required"]}},"/v1/admin/plan-purchases":{"get":{"operationId":"adminListPlanPurchases","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/PlanPurchaseStatus"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlanPurchasePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Plan purchases across merchants with the paid total (PAYNYX plan revenue)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/plans":{"get":{"operationId":"adminListPlans","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlanList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Every plan (including inactive and example plans) with usage counts and the feature catalog","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]},"post":{"operationId":"adminCreatePlan","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlan"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, plan_code_taken."}},"security":[{"session":[]}],"summary":"Create a plan (owner, step-up, audited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","plan_code_taken"]}},"/v1/admin/plans/billing-status":{"get":{"operationId":"adminGetBillingStatus","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingStatus"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Is online plan purchase ready? (billing merchant, zero-fee entitlement, cards, devices)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/plans/billing-status/zero-fee":{"post":{"operationId":"adminGrantBillingZeroFee","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantBillingZeroFeeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingStatus"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, billing_unavailable."}},"security":[{"session":[]}],"summary":"Grant the configured billing merchant the zero_fee entitlement (owner, step-up, audited, idempotent)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","billing_unavailable"]}},"/v1/admin/plans/{planId}":{"patch":{"operationId":"adminUpdatePlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlan"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, invalid_state."}},"security":[{"session":[]}],"summary":"Edit, activate or deactivate a plan (owner, step-up, audited; future purchases only)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","invalid_state"]}},"/v1/admin/providers/dicex":{"get":{"operationId":"adminGetDicexStatus","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DicexProviderStatus"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"DiceX poller checkpoints and errors (credentials are never returned)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/recovery-requests":{"get":{"description":"Requires admin.recovery.read (owner, support). Masked data only; no balances.","operationId":"adminListRecoveryRequests","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/RecoveryRequestStatus"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRecoveryRequestPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Phone-number conflict / account recovery requests, newest first","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/recovery-requests/{requestId}":{"get":{"description":"Requires admin.recovery.read (owner, support).","operationId":"adminGetRecoveryRequest","parameters":[{"in":"path","name":"requestId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRecoveryRequest"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"One recovery request with both accounts side by side","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/recovery-requests/{requestId}/decision":{"post":{"description":"Requires admin.recovery.decide (owner, support) and a recent login. Approve moves ONLY the verified phone identity to the claimant, revokes every session of both accounts, starts the 72 h hold on both, notifies both and closes other pending requests for the same number; balances and merchants never move. It is refused (409) when the request is no longer pending, when the number no longer belongs to the recorded account (stale), when either account is suspended, or when the losing account is active platform staff. Exactly one concurrent decision wins. Deny closes the request and moves nothing.","operationId":"adminDecideRecoveryRequest","parameters":[{"in":"path","name":"requestId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRecoveryDecisionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRecoveryDecision"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, invalid_state, stale_request, protected_account."}},"security":[{"session":[]}],"summary":"Approve (audited transfer of the number only) or deny a recovery request (step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","invalid_state","stale_request","protected_account"]}},"/v1/admin/settings":{"get":{"operationId":"adminListSettings","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Registered settings and their state (never secret values)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/settings/{key}":{"put":{"operationId":"adminSetSetting","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingState"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Set or replace a value (secrets: owner, step-up, typed confirmation)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/settings/{key}/clear":{"post":{"operationId":"adminClearSetting","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearSettingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingState"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Explicitly clear a managed value (the environment fallback applies again)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/settings/{key}/history":{"get":{"operationId":"adminSettingHistory","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SettingHistoryEntry"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Version history metadata (no values)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/settings/{key}/rollback":{"post":{"operationId":"adminRollbackSetting","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackSettingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingState"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited, no_previous_version."}},"security":[{"session":[]}],"summary":"Restore a previous version (last 3 versions, 30 days)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited","no_previous_version"]}},"/v1/admin/settings/{key}/rotate":{"post":{"operationId":"adminRotateSetting","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingState"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Rotate a secret to a new value (new version; previous kept encrypted for rollback)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/settings/{key}/test":{"post":{"operationId":"adminTestSetting","parameters":[{"in":"path","name":"key","required":true,"schema":{"pattern":"^[A-Z][A-Z0-9_]{2,63}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingTestResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, step_up_required, feature_disabled, unknown_setting, confirmation_mismatch, empty_value_refused, rate_limited."}},"security":[{"session":[]}],"summary":"Side-effect-free connection test with a sanitised result","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","step_up_required","feature_disabled","unknown_setting","confirmation_mismatch","empty_value_refused","rate_limited"]}},"/v1/admin/staff":{"get":{"operationId":"adminListStaff","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PlatformStaffMember"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Platform staff (owner only)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]},"post":{"operationId":"adminGrantStaffRole","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantPlatformRoleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformStaffMember"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, staff_exists, invalid_state."}},"security":[{"session":[]}],"summary":"Grant a platform role to an existing user (owner, step-up)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","staff_exists","invalid_state"]}},"/v1/admin/staff/{userId}":{"patch":{"operationId":"adminUpdateStaff","parameters":[{"in":"path","name":"userId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlatformStaffRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformStaffMember"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, last_owner."}},"security":[{"session":[]}],"summary":"Change a staff role or suspend/reactivate (owner, step-up, last-owner protected)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","last_owner"]}},"/v1/admin/staff/{userId}/revoke":{"post":{"operationId":"adminRevokeStaff","parameters":[{"in":"path","name":"userId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformStaffMember"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, step_up_required, last_owner."}},"security":[{"session":[]}],"summary":"Revoke platform access (owner, step-up, last-owner protected)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","step_up_required","last_owner"]}},"/v1/admin/users":{"get":{"operationId":"adminListUsers","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Search users (by id, name, Telegram username or exact Telegram id)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/users/{userId}":{"get":{"operationId":"adminGetUser","parameters":[{"in":"path","name":"userId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetail"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"User detail: memberships, platform role, session summary","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/users/{userId}/revoke-sessions":{"post":{"operationId":"adminRevokeUserSessions","parameters":[{"in":"path","name":"userId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokedCredentials"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Revoke every active session of a user (audited)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/webhook-deliveries":{"get":{"operationId":"adminListWebhookDeliveries","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"merchantId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending","succeeded","failed","dead"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWebhookDeliveryPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required."}},"security":[{"session":[]}],"summary":"Webhook deliveries with attempts, next attempt and sanitised errors","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required"]}},"/v1/admin/webhook-deliveries/{deliveryId}/replay":{"post":{"operationId":"adminReplayWebhookDelivery","parameters":[{"in":"path","name":"deliveryId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWebhookDelivery"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, web_session_required, invalid_state."}},"security":[{"session":[]}],"summary":"Re-queue the SAME event to the same endpoint (no new confirmation or fee)","tags":["admin"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","web_session_required","invalid_state"]}},"/v1/api-key":{"get":{"description":"Lets server integrations discover their merchant id and check the connection without asking the merchant to type the id. Any valid, unrevoked key may call it, whatever its scopes.","operationId":"getCurrentApiKey","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentApiKey"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: unauthenticated, invalid_api_key, rate_limited."}},"security":[{"apiKey":[]}],"summary":"Identify the calling API key: merchant id, mode and scopes (no secrets)","tags":["api-keys"],"x-error-codes":["unauthenticated","invalid_api_key","rate_limited"]}},"/v1/auth/android/challenges":{"post":{"operationId":"createAndroidLoginChallenge","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidChallengeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidChallenge"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, invalid_public_key, telegram_not_configured, rate_limited."}},"security":[],"summary":"Start an Android app login approved through the PAYNYX Telegram bot","tags":["auth"],"x-error-codes":["validation_failed","invalid_public_key","telegram_not_configured","rate_limited"]}},"/v1/auth/android/challenges/{challengeId}/redeem":{"post":{"operationId":"redeemAndroidLoginChallenge","parameters":[{"in":"path","name":"challengeId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidRedeemRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidRedeemStatus"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, not_found, invalid_signature, rate_limited."}},"security":[],"summary":"Poll an app challenge; returns an app session exactly once after approval","tags":["auth"],"x-error-codes":["validation_failed","not_found","invalid_signature","rate_limited"]}},"/v1/auth/android/refresh":{"post":{"operationId":"refreshAndroidSession","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidRefreshRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSessionGrant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, invalid_signature, refresh_reused, session_revoked, session_expired, rate_limited."}},"security":[],"summary":"Rotate the refresh token; a reused or concurrently used token revokes the whole session family","tags":["auth"],"x-error-codes":["validation_failed","invalid_signature","refresh_reused","session_revoked","session_expired","rate_limited"]}},"/v1/auth/android/relay-pairings":{"post":{"description":"Android app sessions only, with the installation proof. Needs devices.manage on the store, like creating a QR pairing. Returns a new device credential (shown once). Pairing the same installation for the same store again revokes the previous device in the same transaction, so at most one credential stays live.","operationId":"pairAndroidRelayDevice","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidRelayPairingRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePairResponse"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, android_session_required, invalid_signature, pairing_unavailable."}},"security":[{"session":[]}],"summary":"Register this signed-in phone as the relay of one of the account's stores (no QR code)","tags":["auth"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","android_session_required","invalid_signature","pairing_unavailable"]}},"/v1/auth/android/web-handoffs":{"post":{"description":"Needs the installation proof as well as the access token: a stolen access token alone cannot mint a web session.","operationId":"createAndroidWebHandoff","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidHandoffRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidWebHandoff"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, android_session_required, invalid_signature."}},"security":[{"session":[]}],"summary":"One-time code that turns this Android session into a web-view cookie session","tags":["auth"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","android_session_required","invalid_signature"]}},"/v1/auth/logout":{"post":{"operationId":"logout","parameters":[],"responses":{"204":{"description":"Success (no content)"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke the current session","tags":["auth"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/auth/methods":{"get":{"operationId":"getAuthMethods","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMethods"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: none."}},"security":[],"summary":"Which sign-in methods are enabled","tags":["auth"],"x-error-codes":[]}},"/v1/auth/phone/otp":{"post":{"operationId":"requestPhoneOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPhoneOtpRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpChallengeIssued"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, feature_disabled, rate_limited, otp_delivery_unavailable, otp_delivery_failed."}},"security":[],"summary":"Send a sign-in code to a mobile number (same response for known and unknown numbers)","tags":["auth"],"x-error-codes":["validation_failed","feature_disabled","rate_limited","otp_delivery_unavailable","otp_delivery_failed"]}},"/v1/auth/phone/verify":{"post":{"operationId":"verifyPhoneOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, feature_disabled, otp_invalid, otp_expired, otp_attempts_exceeded, rate_limited, user_suspended."}},"security":[],"summary":"Verify the code; signs in (creating the account on first use) and issues the browser session","tags":["auth"],"x-error-codes":["validation_failed","feature_disabled","otp_invalid","otp_expired","otp_attempts_exceeded","rate_limited","user_suspended"]}},"/v1/auth/telegram/browser-challenges":{"post":{"operationId":"createBrowserLoginChallenge","parameters":[],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserChallenge"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: rate_limited."}},"security":[],"summary":"Start a browser login approved through the PAYNYX Telegram bot","tags":["auth"],"x-error-codes":["rate_limited"]}},"/v1/auth/telegram/browser-challenges/{challengeId}/redeem":{"post":{"operationId":"redeemBrowserLoginChallenge","parameters":[{"in":"path","name":"challengeId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemBrowserChallengeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserChallengeStatus"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, not_found, rate_limited."}},"security":[],"summary":"Poll a challenge; returns a session exactly once after approval","tags":["auth"],"x-error-codes":["validation_failed","not_found","rate_limited"]}},"/v1/auth/telegram/miniapp":{"post":{"operationId":"loginWithTelegramMiniApp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MiniAppLoginRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, telegram_init_invalid, telegram_init_expired, telegram_init_replayed, rate_limited."}},"security":[],"summary":"Exchange validated Telegram Mini App initData for a session","tags":["auth"],"x-error-codes":["validation_failed","telegram_init_invalid","telegram_init_expired","telegram_init_replayed","rate_limited"]}},"/v1/device/config":{"get":{"operationId":"getDeviceConfig","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceConfig"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: device_signature_invalid, device_clock_skew, device_nonce_reused, device_revoked."}},"security":[{"device":[]}],"summary":"Fetch relay configuration","tags":["device"],"x-error-codes":["device_signature_invalid","device_clock_skew","device_nonce_reused","device_revoked"]}},"/v1/device/events":{"post":{"operationId":"submitDeviceEvents","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceEventsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceEventsResponse"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, device_signature_invalid, device_clock_skew, device_nonce_reused, device_revoked."}},"security":[{"device":[]}],"summary":"Submit classified bank SMS events","tags":["device"],"x-error-codes":["validation_failed","device_signature_invalid","device_clock_skew","device_nonce_reused","device_revoked"]}},"/v1/device/heartbeat":{"post":{"operationId":"sendDeviceHeartbeat","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceHeartbeatRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceHeartbeatResponse"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, device_signature_invalid, device_clock_skew, device_nonce_reused, device_revoked."}},"security":[{"device":[]}],"summary":"Report relay health","tags":["device"],"x-error-codes":["validation_failed","device_signature_invalid","device_clock_skew","device_nonce_reused","device_revoked"]}},"/v1/device/pair":{"post":{"operationId":"pairDevice","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePairRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePairResponse"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, pairing_invalid, pairing_locked, rate_limited."}},"security":[],"summary":"Exchange a pairing code for a device credential","tags":["device"],"x-error-codes":["validation_failed","pairing_invalid","pairing_locked","rate_limited"]}},"/v1/device/test":{"post":{"operationId":"testDeviceConnection","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"const":true,"type":"boolean"},"serverTime":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["ok","serverTime"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: device_signature_invalid, device_clock_skew, device_nonce_reused, device_revoked."}},"security":[{"device":[]}],"summary":"Connectivity and signature self-test (creates no evidence)","tags":["device"],"x-error-codes":["device_signature_invalid","device_clock_skew","device_nonce_reused","device_revoked"]}},"/v1/forwarder/ios-shortcut":{"post":{"description":"Fixed URL for every merchant; the connection code in `Authorization: Bearer pnxi_…` identifies the key and merchant. Body `{ text, receivedAt? }` as `application/json`. The bank is detected from the text and must be the bank of one of the merchant's registered cards (the iPhone has no trustworthy sender, so the sender allowlist does not apply to this format). OTP-like text is refused and never stored; non-deposit text is ignored and not stored. Evidence has the `forwarder` assurance level and is processed immediately, so the response tells the phone whether an invoice was confirmed. Errors are problem+json with a Persian `messageFa`.","operationId":"ingestIosShortcutMessage","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IosShortcutPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IosShortcutResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, invalid_json, invalid_forwarder_key, forwarder_key_revoked, payload_too_large, unsupported_media_type, rate_limited."}},"security":[{"iosShortcutCode":[]}],"summary":"Submit one bank SMS from the PAYNYX iPhone Shortcut (lower assurance, synchronous result)","tags":["forwarders"],"x-error-codes":["validation_failed","invalid_json","invalid_forwarder_key","forwarder_key_revoked","payload_too_large","unsupported_media_type","rate_limited"]}},"/v1/forwarder/{keyPrefix}":{"post":{"description":"Body format is fixed by the key's adapter. Requires `Content-Type: application/json` and `Authorization: Bearer <secret>`. OTP-like messages and senders outside the merchant allowlist are refused without storage (HTTP 200, status `rejected`). Evidence has the `forwarder` assurance level and auto-confirms only when the merchant enabled forwarder auto-confirmation.","operationId":"ingestForwarderMessage","parameters":[{"in":"path","name":"keyPrefix","required":true,"schema":{"pattern":"^fk_[A-Za-z0-9]{12}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForwarderPaynyxV1Payload"},{"$ref":"#/components/schemas/ForwarderIncomingSmsGatewayV1Payload"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwarderIngestResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, invalid_json, invalid_forwarder_key, forwarder_key_revoked, payload_too_large, unsupported_media_type, rate_limited."}},"security":[{"forwarderKey":[]}],"summary":"Submit one bank transaction SMS from a forwarder (lower assurance)","tags":["forwarders"],"x-error-codes":["validation_failed","invalid_json","invalid_forwarder_key","forwarder_key_revoked","payload_too_large","unsupported_media_type","rate_limited"]}},"/v1/invitations/accept":{"post":{"description":"Single use: the first successful acceptance consumes the token. The inviter cannot accept their own invitation; current members get 409 already_member; a bound invitation only accepts the bound Telegram account. Audited.","operationId":"acceptInvitation","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedInvitation"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invitation_not_found, invitation_expired, invitation_used, invitation_revoked, invitation_wrong_user, already_member, merchant_inactive."}},"security":[{"session":[]}],"summary":"Accept an invitation as the signed-in (Telegram-authenticated) user","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invitation_not_found","invitation_expired","invitation_used","invitation_revoked","invitation_wrong_user","already_member","merchant_inactive"]}},"/v1/invitations/preview":{"post":{"operationId":"previewInvitation","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreview"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invitation_not_found, invitation_expired, invitation_used, invitation_revoked, invitation_wrong_user."}},"security":[{"session":[]}],"summary":"Show what a pending invitation grants before accepting (signed-in user)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invitation_not_found","invitation_expired","invitation_used","invitation_revoked","invitation_wrong_user"]}},"/v1/me":{"get":{"operationId":"getMe","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Current user and session","tags":["auth"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/messenger-links":{"get":{"operationId":"listMessengerLinks","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MessengerLink"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Linked messengers of the signed-in user","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/messenger-links/codes":{"post":{"operationId":"createMessengerLinkCode","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessengerLinkCodeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessengerLinkCode"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, feature_disabled, phone_required."}},"security":[{"session":[]}],"summary":"Issue a one-time code (10 minutes) to link Telegram or Bale; requires a verified number","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","feature_disabled","phone_required"]}},"/v1/me/messenger-links/details":{"get":{"operationId":"listMessengerLinkDetails","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MessengerLinkDetail"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Scopes of the signed-in user's linked messengers","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/messenger-links/{linkId}":{"delete":{"operationId":"revokeMessengerLink","parameters":[{"in":"path","name":"linkId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"204":{"description":"Success (no content)"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Unlink a messenger; PAYNYX sessions and memberships are untouched","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/messenger-links/{linkId}/scope":{"patch":{"operationId":"updateMessengerLinkScope","parameters":[{"in":"path","name":"linkId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessengerLinkScopeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessengerLinkDetail"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, step_up_required."}},"security":[{"session":[]}],"summary":"Set the notification scope and (with step-up) the review-decision scope of a link","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","step_up_required"]}},"/v1/me/notification-preferences":{"get":{"operationId":"getNotificationPreferences","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Notification preferences per merchant, event and channel","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"put":{"operationId":"setNotificationPreference","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetNotificationPreferenceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreference"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Enable or disable one event on one channel for one merchant","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/phone/otp":{"post":{"operationId":"requestPhoneChangeOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccountOtpRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpChallengeIssued"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, validation_failed, feature_disabled, rate_limited, otp_delivery_unavailable, otp_delivery_failed, step_up_required, phone_unchanged."}},"security":[{"session":[]}],"summary":"Send a code to a number to attach to (or replace on) the signed-in account","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","validation_failed","feature_disabled","rate_limited","otp_delivery_unavailable","otp_delivery_failed","step_up_required","phone_unchanged"]}},"/v1/me/phone/verify":{"post":{"operationId":"verifyPhoneChangeOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachPhoneResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, validation_failed, feature_disabled, otp_invalid, otp_expired, otp_attempts_exceeded, rate_limited, user_suspended, step_up_required."}},"security":[{"session":[]}],"summary":"Verify the code and attach the number to the SAME account (never merges accounts)","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","validation_failed","feature_disabled","otp_invalid","otp_expired","otp_attempts_exceeded","rate_limited","user_suspended","step_up_required"]}},"/v1/me/security":{"get":{"operationId":"getAccountSecurity","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySummary"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Verified number, sensitive-action hold, step-up freshness and available sign-in methods","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/sessions":{"get":{"operationId":"listMySessions","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SessionInfo"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Active sessions of the signed-in user","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/sessions/revoke-others":{"post":{"operationId":"revokeOtherSessions","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"revoked":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["revoked"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke every session except the current one","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/sessions/{sessionId}":{"delete":{"operationId":"revokeMySession","parameters":[{"in":"path","name":"sessionId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"204":{"description":"Success (no content)"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke one session (never touches memberships)","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/me/step-up/otp":{"post":{"operationId":"requestStepUpOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestStepUpOtpRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpChallengeIssued"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, validation_failed, feature_disabled, rate_limited, otp_delivery_unavailable, otp_delivery_failed, step_up_required, phone_required."}},"security":[{"session":[]}],"summary":"Send a code to the verified number to refresh the 15-minute recent-authentication window","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","validation_failed","feature_disabled","rate_limited","otp_delivery_unavailable","otp_delivery_failed","step_up_required","phone_required"]}},"/v1/me/step-up/verify":{"post":{"operationId":"verifyStepUpOtp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, validation_failed, feature_disabled, otp_invalid, otp_expired, otp_attempts_exceeded, rate_limited, user_suspended, step_up_required, phone_required."}},"security":[{"session":[]}],"summary":"Verify the step-up code for the current session","tags":["account"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","validation_failed","feature_disabled","otp_invalid","otp_expired","otp_attempts_exceeded","rate_limited","user_suspended","step_up_required","phone_required"]}},"/v1/merchants":{"get":{"operationId":"listMerchants","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Merchant"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List the caller's merchants","tags":["merchants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createMerchant","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMerchantRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Create a merchant (caller becomes owner)","tags":["merchants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}":{"get":{"operationId":"getMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Get a merchant","tags":["merchants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"patch":{"operationId":"updateMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMerchantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, personal_sender_not_allowed."}},"security":[{"session":[]}],"summary":"Update merchant settings (owner/admin)","tags":["merchants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","personal_sender_not_allowed"]}},"/v1/merchants/{merchantId}/api-keys":{"get":{"operationId":"listApiKeys","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKey"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List API keys","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createApiKey","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, plan_feature_required."}},"security":[{"session":[]}],"summary":"Create a server-side API key (secret shown once)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","plan_feature_required"]}},"/v1/merchants/{merchantId}/api-keys/{apiKeyId}/project":{"put":{"description":"A project-scoped key creates invoices only in its project and reads only that project's invoices. A request naming another projectId is rejected.","operationId":"bindApiKeyProject","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"apiKeyId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindApiKeyProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyProjectBinding"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, project_name_taken, invalid_project."}},"security":[{"session":[]}],"summary":"Scope an API key to one project, or clear the scope (owner/admin/developer)","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","project_name_taken","invalid_project"]}},"/v1/merchants/{merchantId}/api-keys/{apiKeyId}/revoke":{"post":{"operationId":"revokeApiKey","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"apiKeyId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke an API key","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/archive":{"post":{"operationId":"archiveMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveMerchantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchivedMerchant"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, step_up_required, sensitive_action_held, confirmation_mismatch, invalid_state, merchant_has_open_invoices, merchant_has_pending_deposits."}},"security":[{"session":[]}],"summary":"Archive (delete) a store: owner only; refused while invoices or deposits are unresolved; history is kept","tags":["merchants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","step_up_required","sensitive_action_held","confirmation_mismatch","invalid_state","merchant_has_open_invoices","merchant_has_pending_deposits"]}},"/v1/merchants/{merchantId}/credit":{"get":{"operationId":"getCreditBalance","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Service-credit balance and plan usage","tags":["billing"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/deposits":{"get":{"operationId":"listDeposits","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["unmatched","matched","review","ignored","duplicate"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List parsed deposits (review queue, unmatched, matched)","tags":["deposits"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/deposits/{depositId}/resolve":{"post":{"operationId":"resolveDeposit","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"depositId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveDepositRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state, amount_mismatch, insufficient_credit, invoice_already_paid."}},"security":[{"session":[]}],"summary":"Manually confirm a deposit against an invoice or reject it (audited)","tags":["deposits"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state","amount_mismatch","insufficient_credit","invoice_already_paid"]}},"/v1/merchants/{merchantId}/deposits/{depositId}/sender":{"get":{"operationId":"getDepositSender","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"depositId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnverifiedSender"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state."}},"security":[{"session":[]}],"summary":"Sender of a deposit held for unverified_sender and whether it can be trusted with one tap","tags":["deposits"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state"]}},"/v1/merchants/{merchantId}/deposits/{depositId}/trust-sender":{"post":{"description":"Only for a deposit in review with reviewReason = unverified_sender. Adds its sender to the merchant approved-sender list (the same list as smsSenderAllowlist) and re-runs the unchanged matching rules on this deposit and on other deposits held for the same sender. Personal mobile numbers are never accepted (personal_sender_not_allowed). Owner or admin role only.","operationId":"trustDepositSender","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"depositId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustDepositSenderResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state, personal_sender_not_allowed, sender_not_trustable, senders_too_many, insufficient_credit."}},"security":[{"session":[]}],"summary":"Approve the unknown sender of a deposit held for unverified_sender and re-run matching (owner/admin, audited)","tags":["deposits"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state","personal_sender_not_allowed","sender_not_trustable","senders_too_many","insufficient_credit"]}},"/v1/merchants/{merchantId}/destinations":{"get":{"operationId":"listDestinations","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Destination"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List destinations","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createDestination","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDestinationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_card_number, invalid_iban, bank_card_mismatch, destination_exists, plan_limit_reached."}},"security":[{"session":[]}],"summary":"Register a merchant-owned card destination","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_card_number","invalid_iban","bank_card_mismatch","destination_exists","plan_limit_reached"]}},"/v1/merchants/{merchantId}/destinations/{destinationId}":{"patch":{"operationId":"updateDestination","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"destinationId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDestinationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Update a destination (open invoices keep their assigned destination)","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/destinations/{destinationId}/capacity":{"get":{"operationId":"getDestinationCapacity","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"destinationId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationCapacity"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Capacity limits, schedule and current usage of a destination","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"put":{"operationId":"updateDestinationCapacity","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"destinationId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDestinationCapacityRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationCapacity"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Update capacity limits and schedule (open invoices keep their destination)","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/device-pairings":{"post":{"operationId":"createDevicePairing","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDevicePairingRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePairing"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Create a single-use pairing code for the Android relay","tags":["devices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/devices":{"get":{"operationId":"listDevices","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Device"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List relay devices","tags":["devices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/devices/{deviceId}/revoke":{"post":{"operationId":"revokeDevice","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"deviceId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke a device credential immediately","tags":["devices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/discount-quotes":{"post":{"description":"Owner or admin dashboard session (plans.purchase). The code is applied for real by POST /v1/merchants/{merchantId}/plan-purchases with discountCode.","operationId":"quoteDiscountCode","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountQuoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountQuote"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, code_not_found, code_expired, code_revoked, code_already_used, code_not_redeemable, code_not_applicable, plan_not_available."}},"security":[{"session":[]}],"summary":"Preview a discount code on a plan price (nothing is counted)","tags":["grants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","code_not_found","code_expired","code_revoked","code_already_used","code_not_redeemable","code_not_applicable","plan_not_available"]}},"/v1/merchants/{merchantId}/forwarder-keys":{"get":{"operationId":"listForwarderKeys","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ForwarderKey"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List third-party forwarder keys (secrets are never returned)","tags":["forwarders"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createForwarderKey","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateForwarderKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedForwarderKey"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, limit_reached."}},"security":[{"session":[]}],"summary":"Create a forwarder key for a third-party SMS forwarder or iPhone Shortcut (secret shown once)","tags":["forwarders"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","limit_reached"]}},"/v1/merchants/{merchantId}/forwarder-keys/{forwarderKeyId}/revoke":{"post":{"operationId":"revokeForwarderKey","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"forwarderKeyId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwarderKey"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Revoke a forwarder key immediately","tags":["forwarders"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/grant-redemptions":{"post":{"description":"Merchant API key with scope invoices:write, or an owner/admin dashboard session. Creates the grant in one transaction. Naturally idempotent: the same code + the same merchant again returns the same grant (200), with or without an Idempotency-Key (accepted, e.g. `seamless:grant-redeem:<grant_code_id>`). Problem codes: code_not_found (404: unknown code, or a code that is not for this merchant; never reveals whether it exists elsewhere), code_already_used (422: redeemed by another merchant / no redemptions left), code_expired (422), code_revoked (422), code_not_redeemable (422: discount codes apply to a plan purchase).","operationId":"redeemGrantCode","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemGrantCodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRedemption"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRedemption"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, merchant_inactive, code_not_found, code_expired, code_revoked, code_not_redeemable, code_already_used, plan_not_found."}},"security":[{"session":[]},{"apiKey":[]}],"summary":"Redeem a plan grant code for this merchant","tags":["grants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","merchant_inactive","code_not_found","code_expired","code_revoked","code_not_redeemable","code_already_used","plan_not_found"]}},"/v1/merchants/{merchantId}/grants":{"get":{"operationId":"listMerchantGrants","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantGrantList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]},{"apiKey":[]}],"summary":"The merchant's grants (newest first)","tags":["grants"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/invitations":{"get":{"description":"Requires members.manage. Tokens are never returned again.","operationId":"listInvitations","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List invitations (newest first, at most 200)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"description":"Requires members.manage and the ability to assign the role (no owner, no role above or equal to a non-owner inviter). Audited.","operationId":"createInvitation","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedInvitation"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, role_not_assignable, cannot_modify_self, owner_protected, merchant_inactive, invitation_limit."}},"security":[{"session":[]}],"summary":"Invite a team member (single-use, expiring token shown once)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","role_not_assignable","cannot_modify_self","owner_protected","merchant_inactive","invitation_limit"]}},"/v1/merchants/{merchantId}/invitations/{invitationId}/revoke":{"post":{"description":"Requires members.manage and the ability to assign the invitation role. Audited.","operationId":"revokeInvitation","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"invitationId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, role_not_assignable, cannot_modify_self, owner_protected, invalid_state."}},"security":[{"session":[]}],"summary":"Revoke a pending invitation","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","role_not_assignable","cannot_modify_self","owner_protected","invalid_state"]}},"/v1/merchants/{merchantId}/invoices":{"get":{"operationId":"listInvoices","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/InvoiceStatus"}},{"in":"query","name":"orderRef","required":false,"schema":{"maxLength":128,"type":"string"}},{"in":"query","name":"projectId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"List invoices (newest first)","tags":["invoices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"description":"201 creates a new invoice. 200 returns the existing open/review invoice when the same orderRef is repeated with identical data (no new invoice, no new charge).","operationId":"createInvoice","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, idempotency_conflict, idempotency_in_progress, order_ref_conflict, order_already_paid, no_destination_available, no_eligible_destination, invalid_project, amount_capacity_exhausted, insufficient_credit, merchant_inactive."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Create an invoice with an exact payable amount and destination","tags":["invoices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","idempotency_conflict","idempotency_in_progress","order_ref_conflict","order_already_paid","no_destination_available","no_eligible_destination","invalid_project","amount_capacity_exhausted","insufficient_credit","merchant_inactive"]}},"/v1/merchants/{merchantId}/invoices/{invoiceId}":{"get":{"operationId":"getInvoice","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"invoiceId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Get an invoice","tags":["invoices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/invoices/{invoiceId}/cancel":{"post":{"operationId":"cancelInvoice","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"invoiceId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Cancel an open invoice","tags":["invoices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state"]}},"/v1/merchants/{merchantId}/invoices/{invoiceId}/verify":{"post":{"operationId":"verifyInvoice","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"invoiceId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedInvoice"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Authoritatively re-read invoice status before fulfillment (never charges)","tags":["invoices"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/members":{"get":{"description":"Requires members.manage.","operationId":"listMembers","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List active team members","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/members/leave":{"post":{"operationId":"leaveMerchant","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"204":{"description":"Success (no content)"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, owner_protected."}},"security":[{"session":[]}],"summary":"Leave a merchant team (not available to the owner)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","owner_protected"]}},"/v1/merchants/{merchantId}/members/{membershipId}":{"delete":{"description":"Requires members.manage and the ability to assign the member's role; never the owner or the caller (use leave). Pending invitations created by the removed member are revoked. Merchant data (invoices, wallet, devices, API keys) stays with the merchant. Audited.","operationId":"removeMember","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"membershipId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"204":{"description":"Success (no content)"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, role_not_assignable, cannot_modify_self, owner_protected."}},"security":[{"session":[]}],"summary":"Remove a member (immediate loss of access)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","role_not_assignable","cannot_modify_self","owner_protected"]},"patch":{"description":"Requires members.manage; the caller must be able to assign both the current and the new role; never the owner or the caller. Takes effect on the next request. Audited.","operationId":"changeMemberRole","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"membershipId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMemberRoleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, role_not_assignable, cannot_modify_self, owner_protected."}},"security":[{"session":[]}],"summary":"Change a member's role","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","role_not_assignable","cannot_modify_self","owner_protected"]}},"/v1/merchants/{merchantId}/notifications":{"get":{"operationId":"listNotifications","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"unreadOnly","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"The signed-in user's notification inbox in this merchant, newest first","tags":["notifications"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/notifications/read":{"post":{"operationId":"markNotificationsRead","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNotificationsReadRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNotificationsReadResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Mark some or all of the signed-in user's notifications in this merchant as read (idempotent)","tags":["notifications"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/owner-transfer":{"post":{"description":"Owner only, with a login within the last 15 minutes (403 step_up_required otherwise) and the exact merchant name as confirmation. Atomically promotes the target and demotes the caller to admin; the merchant never has zero or two owners. Audited.","operationId":"transferOwnership","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerTransferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerTransferResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, role_not_assignable, cannot_modify_self, owner_protected, step_up_required, confirmation_mismatch."}},"security":[{"session":[]}],"summary":"Transfer ownership to another active member (owner only, recent login required)","tags":["teams"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","role_not_assignable","cannot_modify_self","owner_protected","step_up_required","confirmation_mismatch"]}},"/v1/merchants/{merchantId}/payment-links":{"get":{"description":"Requires invoices.read. API keys see only their own mode.","operationId":"listPaymentLinks","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"List payment links (newest first)","tags":["payment-links"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"description":"Requires invoices.create. Audited.","operationId":"createPaymentLink","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, slug_taken, merchant_inactive, buyer_note_label_sensitive, plan_limit_reached."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Create a reusable payment link / form","tags":["payment-links"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","slug_taken","merchant_inactive","buyer_note_label_sensitive","plan_limit_reached"]}},"/v1/merchants/{merchantId}/payment-links/{linkId}":{"get":{"operationId":"getPaymentLink","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"linkId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Get a payment link with usage counters","tags":["payment-links"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"patch":{"description":"Requires invoices.create. Audited.","operationId":"updatePaymentLink","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"linkId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentLinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, buyer_note_label_sensitive, plan_limit_reached."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Update or disable a payment link","tags":["payment-links"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","buyer_note_label_sensitive","plan_limit_reached"]}},"/v1/merchants/{merchantId}/plan-purchases":{"get":{"operationId":"listPlanPurchases","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPurchasePage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"The merchant's plan purchases, newest first","tags":["plans"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"description":"Owner or admin role (plans.purchase). An optional discountCode (percent_off / amount_off) lowers the price (floor of the percentage, never below 0); a 100 % discount activates the plan at once without an invoice (paymentMethod discount). Returns the purchase with the checkout URL of an ordinary PAYNYX invoice under the platform billing merchant; the plan is activated automatically when that invoice is confirmed paid. An open pending purchase of the same plan is returned (200) instead of creating a second invoice. Reusing an Idempotency-Key with the same body returns the original purchase; with a different body it fails with idempotency_conflict.","operationId":"createPlanPurchase","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanPurchaseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPurchase"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPurchase"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, billing_unavailable, plan_not_available, merchant_inactive, idempotency_conflict, invalid_state, amount_capacity_exhausted, no_eligible_destination, code_not_found, code_expired, code_revoked, code_already_used, code_not_redeemable, code_not_applicable."}},"security":[{"session":[]}],"summary":"Buy a plan: creates a PAYNYX invoice payable card-to-card on the PAYNYX checkout page","tags":["plans"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","billing_unavailable","plan_not_available","merchant_inactive","idempotency_conflict","invalid_state","amount_capacity_exhausted","no_eligible_destination","code_not_found","code_expired","code_revoked","code_already_used","code_not_redeemable","code_not_applicable"]}},"/v1/merchants/{merchantId}/plans":{"get":{"operationId":"listMerchantPlans","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantPlanCatalog"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Plans on sale, the current plan and whether online purchase is available","tags":["plans"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/projects":{"get":{"operationId":"listProjects","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List projects (shops, sites, bots) of the merchant","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createProject","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, project_name_taken, invalid_project."}},"security":[{"session":[]}],"summary":"Create a project (owner/admin)","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","project_name_taken","invalid_project"]}},"/v1/merchants/{merchantId}/projects/{projectId}":{"get":{"operationId":"getProject","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Get a project","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"patch":{"operationId":"updateProject","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, project_name_taken, invalid_project."}},"security":[{"session":[]}],"summary":"Update project settings (affects future invoices only)","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","project_name_taken","invalid_project"]}},"/v1/merchants/{merchantId}/projects/{projectId}/destinations":{"put":{"operationId":"setProjectDestinations","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectDestinationsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, project_name_taken, invalid_project."}},"security":[{"session":[]}],"summary":"Replace the destinations a project may route to (empty = all merchant destinations)","tags":["projects"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","project_name_taken","invalid_project"]}},"/v1/merchants/{merchantId}/reports/sales":{"get":{"description":"Requires reports.read (owner, admin, finance, support, readonly). Server-side aggregates of this merchant only.","operationId":"getMerchantSalesReport","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantSalesReport"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Sales report for the merchant (Tehran business days)","tags":["reports"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/reports/sales/export":{"get":{"description":"Requires reports.export (owner, admin, finance). At most 92 days and 50,000 rows (otherwise 422 export_too_large). 10 exports per user per 10 minutes. Content-Disposition: attachment, Cache-Control: no-store.","operationId":"exportMerchantSales","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"from","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"basis","required":false,"schema":{"default":"paid","enum":["paid","created"],"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, export_too_large, plan_feature_required."}},"security":[{"session":[]}],"summary":"Bounded CSV export of the merchant invoices (audited, rate-limited)","tags":["reports"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","export_too_large","plan_feature_required"]}},"/v1/merchants/{merchantId}/routing/eligibility":{"post":{"operationId":"checkRoutingEligibility","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingEligibilityRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingEligibility"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_project."}},"security":[{"apiKey":[]},{"session":[]}],"summary":"Explain which destinations would be eligible for an amount, and why others are not","tags":["destinations"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_project"]}},"/v1/merchants/{merchantId}/webhook-deliveries/{deliveryId}/replay":{"post":{"description":"Requires webhooks.manage. Only failed, dead or succeeded deliveries of an active endpoint; nothing financial is re-run. Audited and rate-limited.","operationId":"replayMerchantWebhookDelivery","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"deliveryId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state."}},"security":[{"session":[]}],"summary":"Queue an existing delivery again (same event id and payload, freshly signed)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state"]}},"/v1/merchants/{merchantId}/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"List webhook endpoints","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]},"post":{"operationId":"createWebhookEndpoint","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhookEndpoint"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, unsafe_url, plan_feature_required."}},"security":[{"session":[]}],"summary":"Register an HTTPS webhook endpoint (secret shown once)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","unsafe_url","plan_feature_required"]}},"/v1/merchants/{merchantId}/webhook-endpoints/{endpointId}/deliveries":{"get":{"description":"Requires webhooks.manage.","operationId":"listWebhookDeliveries","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"endpointId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending","succeeded","failed","dead"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Delivery history of a webhook endpoint (newest event first)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/webhook-endpoints/{endpointId}/disable":{"post":{"operationId":"disableWebhookEndpoint","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"endpointId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited."}},"security":[{"session":[]}],"summary":"Disable a webhook endpoint (pending deliveries stop)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited"]}},"/v1/merchants/{merchantId}/webhook-endpoints/{endpointId}/rotate-secret":{"post":{"description":"Requires webhooks.manage. The new secret is returned once. During the overlap every delivery carries one v1= signature per secret. Audited.","operationId":"rotateWebhookSecret","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"endpointId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateWebhookSecretRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatedWebhookSecret"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state."}},"security":[{"session":[]}],"summary":"Rotate the signing secret of a webhook endpoint (old secret kept for an overlap window)","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state"]}},"/v1/merchants/{merchantId}/webhook-endpoints/{endpointId}/test":{"post":{"description":"Requires webhooks.manage. Synchronous, short timeout, SSRF-guarded like every delivery. No invoice, deposit, charge or stored delivery is created; receivers should verify the signature and answer 2xx without processing. Audited and rate-limited.","operationId":"testWebhookEndpoint","parameters":[{"in":"path","name":"merchantId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"in":"path","name":"endpointId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, unauthenticated, forbidden, not_found, rate_limited, invalid_state."}},"security":[{"session":[]}],"summary":"Test the connection: send one signed webhook.test event now and report whether it was acknowledged","tags":["developers"],"x-error-codes":["validation_failed","unauthenticated","forbidden","not_found","rate_limited","invalid_state"]}},"/v1/partner/grant-codes":{"post":{"description":"Server-to-server. Headers: X-Paynyx-Partner (key id), X-Paynyx-Timestamp (Unix seconds, ±300 s), X-Paynyx-Nonce (16-64 of [A-Za-z0-9_-], single use for 24 h), X-Paynyx-Signature = hex(HMAC-SHA256(secret, timestamp.nonce.METHOD.path.sha256hex(rawBody))). The caller IP must be on the partner allowlist. The signed path is the raw request path as received (including any base-URL prefix), without the query string. Idempotency-Key replays (same body) return the same id with code = null and replayed = true; another body is idempotency_conflict; a concurrent request with the same key is idempotency_in_progress (retry).","operationId":"partnerCreateGrantCode","parameters":[{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerGrantCodeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerGrantCodeCreated"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, partner_signature_invalid, partner_clock_skew, partner_nonce_reused, partner_disabled, partner_ip_not_allowed, partner_scope_missing, not_found, rate_limited, plan_not_found, idempotency_conflict, idempotency_in_progress."}},"security":[{"partner":[]}],"summary":"Issue a single-use plan grant code (partner, HMAC-signed)","tags":["partner"],"x-error-codes":["validation_failed","partner_signature_invalid","partner_clock_skew","partner_nonce_reused","partner_disabled","partner_ip_not_allowed","partner_scope_missing","not_found","rate_limited","plan_not_found","idempotency_conflict","idempotency_in_progress"]}},"/v1/partner/grant-codes/{id}":{"get":{"operationId":"partnerGetGrantCode","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerGrantCode"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, partner_signature_invalid, partner_clock_skew, partner_nonce_reused, partner_disabled, partner_ip_not_allowed, partner_scope_missing, not_found, rate_limited."}},"security":[{"partner":[]}],"summary":"Status of one of the partner's own codes","tags":["partner"],"x-error-codes":["validation_failed","partner_signature_invalid","partner_clock_skew","partner_nonce_reused","partner_disabled","partner_ip_not_allowed","partner_scope_missing","not_found","rate_limited"]}},"/v1/partner/grant-codes/{id}/revoke":{"post":{"description":"Idempotent: revoking a revoked code returns its current state. Nothing already charged changes.","operationId":"partnerRevokeGrantCode","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerRevokeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerGrantCode"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, partner_signature_invalid, partner_clock_skew, partner_nonce_reused, partner_disabled, partner_ip_not_allowed, partner_scope_missing, not_found, rate_limited."}},"security":[{"partner":[]}],"summary":"Revoke a code and any grant made from it (future confirmations bill normally)","tags":["partner"],"x-error-codes":["validation_failed","partner_signature_invalid","partner_clock_skew","partner_nonce_reused","partner_disabled","partner_ip_not_allowed","partner_scope_missing","not_found","rate_limited"]}},"/v1/public/invoices/{publicId}":{"get":{"operationId":"getPublicInvoice","parameters":[{"in":"path","name":"publicId","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{22}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvoice"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: not_found, rate_limited."}},"security":[],"summary":"Buyer-facing invoice view for hosted checkout","tags":["checkout"],"x-error-codes":["not_found","rate_limited"]}},"/v1/public/payment-links/{slug}":{"get":{"operationId":"getPublicPaymentLink","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9][a-z0-9-]{2,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPaymentLink"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: not_found, rate_limited."}},"security":[],"summary":"Buyer-facing payment link view","tags":["checkout"],"x-error-codes":["not_found","rate_limited"]}},"/v1/public/payment-links/{slug}/invoices":{"post":{"description":"201 creates a new invoice through the normal invoice path (fees, service credit, destination capacity, amount quarantine). Repeating the same Idempotency-Key with the same body returns the same attempt (200); a different body is 422 idempotency_conflict. Rate-limited per IP and per link.","operationId":"startPaymentLink","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9][a-z0-9-]{2,62}$","type":"string"}},{"description":"Unique per logical request (≤255 chars). Replays return the original response for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPaymentLinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedPaymentLink"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedPaymentLink"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: validation_failed, not_found, rate_limited, idempotency_conflict, idempotency_in_progress, no_destination_available, no_eligible_destination, invalid_project, amount_capacity_exhausted, insufficient_credit, merchant_inactive, link_disabled, link_expired, link_exhausted, buyer_note_sensitive."}},"security":[],"summary":"Start a NEW independent invoice attempt from a payment link","tags":["checkout"],"x-error-codes":["validation_failed","not_found","rate_limited","idempotency_conflict","idempotency_in_progress","no_destination_available","no_eligible_destination","invalid_project","amount_capacity_exhausted","insufficient_credit","merchant_inactive","link_disabled","link_expired","link_exhausted","buyer_note_sensitive"]}},"/v1/public/plans":{"get":{"operationId":"listPublicPlans","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPlanList"}}},"description":"Success"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error. Possible codes: rate_limited."}},"security":[],"summary":"Plans on sale (public pricing page); no ids, cache-friendly","tags":["plans"],"x-error-codes":["rate_limited"]}}},"servers":[{"description":"PAYNYX production API (default). Self-hosted deployments use their own origin.","url":"https://paynyx.top"}],"tags":[{"name":"account"},{"name":"admin"},{"name":"api-keys"},{"name":"auth"},{"name":"billing"},{"name":"checkout"},{"name":"deposits"},{"name":"destinations"},{"name":"developers"},{"name":"device"},{"name":"devices"},{"name":"forwarders"},{"name":"grants"},{"name":"invoices"},{"name":"merchants"},{"name":"notifications"},{"name":"partner"},{"name":"payment-links"},{"name":"plans"},{"name":"projects"},{"name":"reports"},{"name":"teams"}],"webhooks":{"paynyxEvent":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Acknowledged; any non-2xx is retried with backoff."}},"summary":"Event delivered to your webhook endpoint"}}}}