{
  "openapi": "3.1.0",
  "info": {
    "title": "MYRT Partner API",
    "version": "1.0.0",
    "description": "Server-to-server API for minting, redeeming and transferring MYRT, reading on-chain balances and reading verification status. Every response is JSON with ok true or false, and every error carries a stable error.code."
  },
  "servers": [
    {
      "url": "https://api.myrt.money/v1",
      "description": "Live. Keys start with myrt_live_."
    },
    {
      "url": "https://sandbox-api.myrt.money/v1",
      "description": "Sandbox. Keys start with myrt_sandbox_. Testnet and test fiat rails; no real money moves."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "System",
      "description": "Liveness, server time, network and token configuration."
    },
    {
      "name": "Mints",
      "description": "Issue MYRT against confirmed MYR."
    },
    {
      "name": "Redeems",
      "description": "Burn MYRT and pay out MYR to the customer's registered bank account."
    },
    {
      "name": "Transfers",
      "description": "Move MYRT to a recipient wallet on the customer's behalf."
    },
    {
      "name": "Transactions",
      "description": "Read and list every order you created, in any direction."
    },
    {
      "name": "Balances",
      "description": "On-chain MYRT balances."
    },
    {
      "name": "Accounts",
      "description": "Customer and corporate verification status, under a data processing agreement."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service liveness",
        "description": "Returns the service status. Takes no key.",
        "tags": [
          "System"
        ],
        "x-myrt-scope": null,
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "The service is up.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "ok": true,
                  "service": "myrt-api",
                  "apiVersion": "v1",
                  "status": "healthy",
                  "timestamp": "2026-09-10T04:12:33.918Z"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/system/time": {
      "get": {
        "operationId": "getServerTime",
        "summary": "Server time, for clock-skew checks",
        "description": "Returns the current server time in UTC. Use it to detect clock skew before verifying webhook timestamps.",
        "tags": [
          "System"
        ],
        "x-myrt-scope": null,
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "The current server time.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerTime"
                },
                "example": {
                  "ok": true,
                  "serverTime": "2026-09-10T04:12:33.918Z",
                  "timezone": "UTC"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/config": {
      "get": {
        "operationId": "getConfig",
        "summary": "Chains, decimals, endpoint map",
        "description": "Returns the supported chains, the MYRT decimals and the endpoint map for the host you are talking to. Read it at startup and cache it for the process lifetime.",
        "tags": [
          "System"
        ],
        "x-myrt-scope": "config:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "responses": {
          "200": {
            "description": "Network and token configuration.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Config"
                },
                "example": {
                  "ok": true,
                  "apiVersion": "v1",
                  "defaultChainId": 1,
                  "decimals": 6,
                  "chains": [
                    {
                      "key": "ethereum",
                      "name": "Ethereum",
                      "chainId": 1,
                      "caip2": "eip155:1",
                      "nativeCurrency": {
                        "name": "Ether",
                        "symbol": "ETH",
                        "decimals": 18
                      },
                      "explorerBaseUrl": "https://etherscan.io",
                      "explorerAddressUrl": "https://etherscan.io/address/",
                      "explorerTxUrl": "https://etherscan.io/tx/",
                      "confirmations": 15,
                      "myrt": {
                        "address": "0x...",
                        "decimals": 6,
                        "name": "MYR Stablecoin",
                        "symbol": "MYRT"
                      }
                    }
                  ],
                  "endpoints": {
                    "mints": "/v1/mints",
                    "redeems": "/v1/redeems",
                    "transfers": "/v1/transfers",
                    "balances": "/v1/balances/{walletAddress}",
                    "transactions": "/v1/transactions/{referenceId}"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/tokens": {
      "get": {
        "operationId": "listTokens",
        "summary": "MYRT token address per chain",
        "description": "Returns the MYRT token address and decimals on each supported chain. Read the address from here rather than hardcoding it.",
        "tags": [
          "System"
        ],
        "x-myrt-scope": "config:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "responses": {
          "200": {
            "description": "The MYRT token on each supported chain.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenList"
                },
                "example": {
                  "ok": true,
                  "tokens": [
                    {
                      "symbol": "MYRT",
                      "name": "MYR Stablecoin",
                      "chainId": 1,
                      "network": "Ethereum",
                      "tokenAddress": "0x...",
                      "decimals": 6,
                      "explorerUrl": "https://etherscan.io/address/0x..."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/mints": {
      "post": {
        "operationId": "createMint",
        "summary": "Create a mint order",
        "description": "Records a mint order for a linked customer. Sending fiatConfirmed: true submits it for settlement and additionally requires mint:execute.",
        "tags": [
          "Mints"
        ],
        "x-myrt-scope": "mint:create",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "One UUID per logical operation, 1 to 255 characters. Reuse the same key and body on a retry.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "format": "uuid"
            },
            "example": "550e8400-e29b-41d4-a716-446655440000"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintCreateRequest"
              },
              "example": {
                "referenceId": "acme:mint:2026-09-10:00417",
                "amountMyr": "1000.00",
                "walletAddress": "0xAbC0000000000000000000000000000000000001",
                "customerId": "cus_9f2a3b4c",
                "fiatConfirmed": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The mint order was recorded.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-MYRT-Idempotent-Replay": {
                "$ref": "#/components/headers/XMyrtIdempotentReplay"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:mint:2026-09-10:00417",
                  "status": "payment_pending",
                  "phase": "PAYMENT_PENDING",
                  "direction": "MINT",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "1000.00",
                    "myrt": "1000.00",
                    "feeMyr": "1.00",
                    "amountRaw": "1000000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": null,
                    "blockNumber": null
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/SettlementFailed"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_JSON",
          "IDEMPOTENCY_KEY_REQUIRED",
          "INVALID_AMOUNT",
          "INVALID_WALLET_ADDRESS",
          "INVALID_REFERENCE_ID",
          "AMOUNT_NEGATIVE_OR_ZERO",
          "AMOUNT_BELOW_FLOOR",
          "FOREIGNER_LIMIT_EXCEEDED",
          "POLICY_REJECTED",
          "SCOPE_DENIED",
          "CUSTOMER_NOT_VERIFIED",
          "NOT_FOUND",
          "IDEMPOTENCY_CONFLICT",
          "SETTLEMENT_FAILED"
        ]
      }
    },
    "/mints/{referenceId}": {
      "get": {
        "operationId": "getMint",
        "summary": "Read a mint order",
        "description": "Returns the current state of a mint order you created. An order that is not a mint, or that another integration created, returns 404 NOT_FOUND.",
        "tags": [
          "Mints"
        ],
        "x-myrt-scope": "mint:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "description": "The referenceId you supplied on creation.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9._:-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The mint order.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:mint:2026-09-10:00417",
                  "status": "completed",
                  "phase": "COMPLETED",
                  "direction": "MINT",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "1000.00",
                    "myrt": "1000.00",
                    "feeMyr": "1.00",
                    "amountRaw": "1000000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": "0x...",
                    "blockNumber": "20481922"
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": "2026-09-10T04:19:02.441Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_REFERENCE_ID",
          "NOT_FOUND"
        ]
      }
    },
    "/mints/{referenceId}/cancel": {
      "post": {
        "operationId": "cancelMint",
        "summary": "Cancel a mint order before settlement",
        "description": "Cancels a mint order that has not yet been submitted for settlement. The response is the order with status cancelled.",
        "tags": [
          "Mints"
        ],
        "x-myrt-scope": "mint:create",
        "x-myrt-availability": "planned",
        "x-myrt-rate-class": "write",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "description": "The referenceId you supplied on creation.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9._:-]{8,100}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "One UUID per logical operation, 1 to 255 characters. Reuse the same key and body on a retry.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "format": "uuid"
            },
            "example": "550e8400-e29b-41d4-a716-446655440000"
          }
        ],
        "responses": {
          "200": {
            "description": "The order was cancelled.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-MYRT-Idempotent-Replay": {
                "$ref": "#/components/headers/XMyrtIdempotentReplay"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:mint:2026-09-10:00417",
                  "status": "cancelled",
                  "phase": "FAILED",
                  "direction": "MINT",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "1000.00",
                    "myrt": "1000.00",
                    "feeMyr": "1.00",
                    "amountRaw": "1000000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": null,
                    "blockNumber": null
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": "2026-09-10T04:19:02.441Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "IDEMPOTENCY_KEY_REQUIRED",
          "INVALID_REFERENCE_ID",
          "NOT_FOUND",
          "ORDER_NOT_CANCELLABLE"
        ]
      }
    },
    "/redeems": {
      "post": {
        "operationId": "createRedeem",
        "summary": "Create a redeem order",
        "description": "Creates a redeem order and submits it for settlement, burning MYRT from the customer's wallet. Requires both redeem:create and redeem:execute.",
        "tags": [
          "Redeems"
        ],
        "x-myrt-scope": "redeem:create",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "One UUID per logical operation, 1 to 255 characters. Reuse the same key and body on a retry.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "format": "uuid"
            },
            "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemCreateRequest"
              },
              "example": {
                "referenceId": "acme:redeem:2026-09-10:00092",
                "amountMyrt": "500.00",
                "walletAddress": "0xAbC0000000000000000000000000000000000001",
                "customerId": "cus_9f2a3b4c",
                "bankReference": "acme-payout-00092"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The redeem order was accepted.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-MYRT-Idempotent-Replay": {
                "$ref": "#/components/headers/XMyrtIdempotentReplay"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:redeem:2026-09-10:00092",
                  "status": "pending",
                  "phase": "ORDER_CREATED",
                  "direction": "REDEEM",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "500.00",
                    "myrt": "500.00",
                    "feeMyr": "0.00",
                    "amountRaw": "500000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": null,
                    "blockNumber": null
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/SettlementFailed"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_JSON",
          "IDEMPOTENCY_KEY_REQUIRED",
          "INVALID_AMOUNT",
          "INVALID_WALLET_ADDRESS",
          "INVALID_REFERENCE_ID",
          "INSUFFICIENT_BALANCE",
          "AMOUNT_NEGATIVE_OR_ZERO",
          "AMOUNT_ABOVE_REDEEM_CEILING",
          "FOREIGNER_LIMIT_EXCEEDED",
          "POLICY_REJECTED",
          "MONTHLY_WITHDRAWAL_LIMIT_EXCEEDED",
          "SCOPE_DENIED",
          "CUSTOMER_NOT_VERIFIED",
          "NOT_FOUND",
          "IDEMPOTENCY_CONFLICT",
          "SETTLEMENT_FAILED"
        ]
      }
    },
    "/redeems/{referenceId}": {
      "get": {
        "operationId": "getRedeem",
        "summary": "Read a redeem order",
        "description": "Returns the current state of a redeem order you created. Any other order returns 404 NOT_FOUND.",
        "tags": [
          "Redeems"
        ],
        "x-myrt-scope": "redeem:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "description": "The referenceId you supplied on creation.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9._:-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The redeem order.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:redeem:2026-09-10:00092",
                  "status": "completed",
                  "phase": "COMPLETED",
                  "direction": "REDEEM",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "500.00",
                    "myrt": "500.00",
                    "feeMyr": "0.00",
                    "amountRaw": "500000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": "0x...",
                    "blockNumber": "20481922"
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": "2026-09-10T04:19:02.441Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_REFERENCE_ID",
          "NOT_FOUND"
        ]
      }
    },
    "/transfers": {
      "post": {
        "operationId": "createTransfer",
        "summary": "Create a transfer",
        "description": "Creates a transfer and submits it for settlement. Requires both transfer:create and transfer:execute.",
        "tags": [
          "Transfers"
        ],
        "x-myrt-scope": "transfer:create",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "One UUID per logical operation, 1 to 255 characters. Reuse the same key and body on a retry.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "format": "uuid"
            },
            "example": "9b2d0f6e-3c1a-4e8f-9d7b-5a6c4e2f1b0a"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferCreateRequest"
              },
              "example": {
                "referenceId": "acme:transfer:2026-09-10:00031",
                "amountMyrt": "250.00",
                "walletAddress": "0xAbC0000000000000000000000000000000000001",
                "customerId": "cus_9f2a3b4c"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The transfer was accepted.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-MYRT-Idempotent-Replay": {
                "$ref": "#/components/headers/XMyrtIdempotentReplay"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:transfer:2026-09-10:00031",
                  "status": "pending",
                  "phase": "ORDER_CREATED",
                  "direction": "TRANSFER",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": null,
                    "myrt": "250.00",
                    "feeMyr": "0",
                    "amountRaw": "250000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": null,
                    "blockNumber": null
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/SettlementFailed"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_JSON",
          "IDEMPOTENCY_KEY_REQUIRED",
          "INVALID_AMOUNT",
          "INVALID_WALLET_ADDRESS",
          "INVALID_REFERENCE_ID",
          "AMOUNT_NEGATIVE_OR_ZERO",
          "TRANSFER_PER_TX_CAP_EXCEEDED",
          "TRANSFER_DAILY_CAP_EXCEEDED",
          "POLICY_REJECTED",
          "RECIPIENT_NOT_PERMITTED",
          "SCOPE_DENIED",
          "CUSTOMER_NOT_VERIFIED",
          "NOT_FOUND",
          "IDEMPOTENCY_CONFLICT",
          "SETTLEMENT_FAILED"
        ]
      }
    },
    "/transfers/{referenceId}": {
      "get": {
        "operationId": "getTransfer",
        "summary": "Read a transfer",
        "description": "Returns the current state of a transfer you created. Any other order returns 404 NOT_FOUND.",
        "tags": [
          "Transfers"
        ],
        "x-myrt-scope": "transfer:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "description": "The referenceId you supplied on creation.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9._:-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The transfer.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:transfer:2026-09-10:00031",
                  "status": "completed",
                  "phase": "COMPLETED",
                  "direction": "TRANSFER",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": null,
                    "myrt": "250.00",
                    "feeMyr": "0",
                    "amountRaw": "250000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": "0x...",
                    "blockNumber": "20481922"
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": "2026-09-10T04:19:02.441Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_REFERENCE_ID",
          "NOT_FOUND"
        ]
      }
    },
    "/transactions": {
      "get": {
        "operationId": "listTransactions",
        "summary": "List your orders, paginated",
        "description": "Lists the orders you created in any direction, newest first. Page with cursor until nextCursor is null.",
        "tags": [
          "Transactions"
        ],
        "x-myrt-scope": "transaction:read",
        "x-myrt-availability": "planned",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Only orders in this direction.",
            "schema": {
              "$ref": "#/components/schemas/Direction"
            },
            "example": "MINT"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only orders with this status.",
            "schema": {
              "$ref": "#/components/schemas/OrderStatus"
            },
            "example": "completed"
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "description": "Only orders created after this ISO 8601 timestamp.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "description": "Only orders created before this ISO 8601 timestamp.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "example": 50
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page's nextCursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of orders, newest first.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionList"
                },
                "example": {
                  "ok": true,
                  "transactions": [
                    {
                      "ok": true,
                      "referenceId": "acme:mint:2026-09-10:00417",
                      "status": "completed",
                      "phase": "COMPLETED",
                      "direction": "MINT",
                      "chainId": 1,
                      "network": "Ethereum",
                      "tokenAddress": "0x...",
                      "walletAddress": "0xAbC0000000000000000000000000000000000001",
                      "amounts": {
                        "myr": "1000.00",
                        "myrt": "1000.00",
                        "feeMyr": "1.00",
                        "amountRaw": "1000000000",
                        "decimals": 6
                      },
                      "blockchain": {
                        "txHash": "0x...",
                        "blockNumber": "20481922"
                      },
                      "timestamps": {
                        "createdAt": "2026-09-10T04:12:33.918Z",
                        "updatedAt": "2026-09-10T04:19:02.441Z"
                      }
                    }
                  ],
                  "nextCursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "BAD_REQUEST"
        ]
      }
    },
    "/transactions/{referenceId}": {
      "get": {
        "operationId": "getTransaction",
        "summary": "Read any order you created",
        "description": "Returns an order you created, in any direction. An order created by another integration returns 404 NOT_FOUND, the same as a missing one.",
        "tags": [
          "Transactions"
        ],
        "x-myrt-scope": "transaction:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "description": "The referenceId you supplied on creation.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9._:-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "ok": true,
                  "referenceId": "acme:mint:2026-09-10:00417",
                  "status": "completed",
                  "phase": "COMPLETED",
                  "direction": "MINT",
                  "chainId": 1,
                  "network": "Ethereum",
                  "tokenAddress": "0x...",
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "amounts": {
                    "myr": "1000.00",
                    "myrt": "1000.00",
                    "feeMyr": "1.00",
                    "amountRaw": "1000000000",
                    "decimals": 6
                  },
                  "blockchain": {
                    "txHash": "0x...",
                    "blockNumber": "20481922"
                  },
                  "timestamps": {
                    "createdAt": "2026-09-10T04:12:33.918Z",
                    "updatedAt": "2026-09-10T04:19:02.441Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_REFERENCE_ID",
          "NOT_FOUND"
        ]
      }
    },
    "/balances/{walletAddress}": {
      "get": {
        "operationId": "getBalance",
        "summary": "On-chain MYRT balance",
        "description": "Reads the on-chain MYRT balance of a wallet on every call, so it draws from the tighter balance bucket. Without chainId it returns one entry per chain listed in /config.",
        "tags": [
          "Balances"
        ],
        "x-myrt-scope": "balance:read",
        "x-myrt-availability": "live",
        "x-myrt-rate-class": "balance",
        "parameters": [
          {
            "name": "walletAddress",
            "in": "path",
            "required": true,
            "description": "EVM wallet address. It is returned checksummed.",
            "schema": {
              "type": "string"
            },
            "example": "0xAbC0000000000000000000000000000000000001"
          },
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "description": "Restrict the result to one chain from /config.",
            "schema": {
              "type": "integer"
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "The MYRT balance per chain.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                },
                "example": {
                  "ok": true,
                  "walletAddress": "0xAbC0000000000000000000000000000000000001",
                  "balances": [
                    {
                      "chainId": 1,
                      "network": "Ethereum",
                      "tokenAddress": "0x...",
                      "symbol": "MYRT",
                      "decimals": 6,
                      "balanceRaw": "212400000",
                      "balance": "212.4"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "INVALID_WALLET_ADDRESS"
        ]
      }
    },
    "/customers/{customerId}": {
      "get": {
        "operationId": "getCustomer",
        "summary": "Customer verification status",
        "description": "Returns the verification status, residency, limits and capabilities of a customer linked to your integration. Refused with 403 SCOPE_DENIED until a data processing agreement is on file.",
        "tags": [
          "Accounts"
        ],
        "x-myrt-scope": "account:read",
        "x-myrt-availability": "planned",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "description": "The opaque customer identifier MYRT assigned when the customer was linked to your integration.",
            "schema": {
              "type": "string"
            },
            "example": "cus_9f2a3b4c"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer's verification status.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "example": {
                  "ok": true,
                  "customerId": "cus_9f2a3b4c",
                  "accountType": "RETAIL",
                  "verification": {
                    "status": "VERIFIED",
                    "level": "TIER_2",
                    "verifiedAt": "2026-04-02T09:11:00.000Z"
                  },
                  "residency": {
                    "countryCode": "MY",
                    "isResident": true
                  },
                  "limits": {
                    "currency": "MYR",
                    "monthlyWithdrawalCap": "50000.00",
                    "monthlyWithdrawalUsed": "12500.00",
                    "monthlyWithdrawalRemaining": "37500.00"
                  },
                  "capabilities": {
                    "canMint": true,
                    "canRedeem": true,
                    "canTransfer": true
                  },
                  "createdAt": "2026-04-01T02:20:14.000Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "NOT_FOUND",
          "SCOPE_DENIED"
        ]
      }
    },
    "/corporates/{corporateId}": {
      "get": {
        "operationId": "getCorporate",
        "summary": "Corporate verification status",
        "description": "Returns the verification status and capabilities of a corporate linked to your integration. Refused with 403 SCOPE_DENIED until a data processing agreement is on file.",
        "tags": [
          "Accounts"
        ],
        "x-myrt-scope": "account:read",
        "x-myrt-availability": "planned",
        "x-myrt-rate-class": "read",
        "parameters": [
          {
            "name": "corporateId",
            "in": "path",
            "required": true,
            "description": "The opaque corporate identifier.",
            "schema": {
              "type": "string"
            },
            "example": "cor_71bd5e29"
          }
        ],
        "responses": {
          "200": {
            "description": "The corporate's verification status.",
            "headers": {
              "X-MYRT-API-Version": {
                "$ref": "#/components/headers/XMyrtApiVersion"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Corporate"
                },
                "example": {
                  "ok": true,
                  "corporateId": "cor_71bd5e29",
                  "companyName": "Acme Sdn Bhd",
                  "verification": {
                    "status": "VERIFIED",
                    "stage": "COMPLETE",
                    "verifiedAt": "2026-05-18T03:44:00.000Z"
                  },
                  "jurisdiction": {
                    "countryCode": "MY"
                  },
                  "industry": "Payments",
                  "capabilities": {
                    "canMint": true,
                    "canRedeem": true,
                    "canPayroll": true
                  },
                  "createdAt": "2026-05-02T01:02:03.000Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-myrt-error-codes": [
          "NOT_FOUND",
          "SCOPE_DENIED"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "MYRT API key",
        "description": "Authorization: Bearer <key>. A key works only in the environment it was issued for; using it on the other host returns 401 UNAUTHORIZED."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "One UUID per logical operation, 1 to 255 characters. Reuse the same key and body on a retry.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "format": "uuid"
        },
        "example": "550e8400-e29b-41d4-a716-446655440000"
      },
      "ReferenceId": {
        "name": "referenceId",
        "in": "path",
        "required": true,
        "description": "The referenceId you supplied on creation.",
        "schema": {
          "type": "string",
          "minLength": 8,
          "maxLength": 100,
          "pattern": "^[A-Za-z0-9._:-]{8,100}$"
        }
      }
    },
    "headers": {
      "XMyrtApiVersion": {
        "description": "Always v1.",
        "schema": {
          "type": "string",
          "const": "v1"
        }
      },
      "XMyrtIdempotentReplay": {
        "description": "true when a POST was answered from the stored original response. Nothing was created twice.",
        "schema": {
          "type": "string",
          "enum": [
            "true"
          ]
        }
      },
      "XRateLimitLimit": {
        "description": "Requests allowed per minute in this bucket.",
        "schema": {
          "type": "integer"
        }
      },
      "XRateLimitRemaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "XRateLimitReset": {
        "description": "Unix time in seconds when the window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying. Only on 429.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request failed validation or a policy check. See x-myrt-error-codes on the operation for the codes it can return.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "ok": false,
              "error": {
                "code": "INSUFFICIENT_BALANCE",
                "message": "Wallet has insufficient MYRT balance for redemption.",
                "meta": {
                  "requestedMyrt": "500.00",
                  "walletBalanceMyrt": "212.40"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "UNAUTHORIZED: the key is missing, malformed, unknown, revoked, expired or issued for the other environment. The message never says which.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "ok": false,
              "error": {
                "code": "UNAUTHORIZED",
                "message": "Invalid or expired API key."
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "IP_NOT_ALLOWED, SCOPE_DENIED, CUSTOMER_NOT_VERIFIED or RECIPIENT_NOT_PERMITTED, depending on the operation.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "NOT_FOUND: no such order or party, or one that another integration created. The two cases are indistinguishable.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "IDEMPOTENCY_CONFLICT: the Idempotency-Key was reused with a different body, or the referenceId with different details. ORDER_NOT_CANCELLABLE on cancel.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "RATE_LIMITED: the bucket for this key is exhausted. Back off until X-RateLimit-Reset and honour Retry-After.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServerError": {
        "description": "SERVER_ERROR: unexpected error. Retry with backoff, then quote meta.correlationId to support.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "SettlementFailed": {
        "description": "SETTLEMENT_FAILED: settlement submission failed. Retry with the same Idempotency-Key and body.",
        "headers": {
          "X-MYRT-API-Version": {
            "$ref": "#/components/headers/XMyrtApiVersion"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Order": {
        "type": "object",
        "description": "Every mint, redeem and transfer is an order and serialises to this object.",
        "required": [
          "ok",
          "referenceId",
          "status",
          "phase",
          "direction",
          "chainId",
          "network",
          "tokenAddress",
          "walletAddress",
          "amounts",
          "blockchain",
          "timestamps"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "referenceId": {
            "type": "string",
            "description": "The handle you chose on creation.",
            "examples": [
              "acme:mint:2026-09-10:00417"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "phase": {
            "$ref": "#/components/schemas/OrderPhase"
          },
          "direction": {
            "$ref": "#/components/schemas/Direction"
          },
          "chainId": {
            "type": "integer",
            "description": "The chain the order settles on.",
            "examples": [
              1
            ]
          },
          "network": {
            "type": "string",
            "description": "Display name of the chain.",
            "examples": [
              "Ethereum"
            ]
          },
          "tokenAddress": {
            "type": "string",
            "description": "The MYRT contract on that chain.",
            "examples": [
              "0x..."
            ]
          },
          "walletAddress": {
            "type": "string",
            "description": "For a mint, the recipient. For a redeem, the wallet MYRT is burned from. For a transfer, the recipient.",
            "examples": [
              "0xAbC0000000000000000000000000000000000001"
            ]
          },
          "amounts": {
            "$ref": "#/components/schemas/Amounts"
          },
          "blockchain": {
            "$ref": "#/components/schemas/Blockchain"
          },
          "timestamps": {
            "$ref": "#/components/schemas/Timestamps"
          }
        },
        "examples": [
          {
            "ok": true,
            "referenceId": "acme:mint:2026-09-10:00417",
            "status": "payment_pending",
            "phase": "PAYMENT_PENDING",
            "direction": "MINT",
            "chainId": 1,
            "network": "Ethereum",
            "tokenAddress": "0x...",
            "walletAddress": "0xAbC0000000000000000000000000000000000001",
            "amounts": {
              "myr": "1000.00",
              "myrt": "1000.00",
              "feeMyr": "1.00",
              "amountRaw": "1000000000",
              "decimals": 6
            },
            "blockchain": {
              "txHash": null,
              "blockNumber": null
            },
            "timestamps": {
              "createdAt": "2026-09-10T04:12:33.918Z",
              "updatedAt": null
            }
          }
        ]
      },
      "Amounts": {
        "type": "object",
        "description": "Decimal strings, never numbers. Strings are not zero-padded, so parse with a decimal library and never compare amount strings.",
        "required": [
          "myr",
          "myrt",
          "feeMyr",
          "amountRaw",
          "decimals"
        ],
        "properties": {
          "myr": {
            "type": [
              "string",
              "null"
            ],
            "description": "Mint: the MYR funded. Redeem: the net MYR paid out after feeMyr. Transfer: null."
          },
          "myrt": {
            "type": "string",
            "description": "Mint: equals myr, issuance is 1:1. Redeem: the amount burned. Transfer: the amount moved."
          },
          "feeMyr": {
            "type": "string",
            "description": "Mint: the payment rail charge recorded on the order; it does not reduce myrt. Transfer: \"0\". Fees are quoted server-side."
          },
          "amountRaw": {
            "type": "string",
            "description": "The exact on-chain integer, myrt scaled by 10^6. Compare this with the Transfer event."
          },
          "decimals": {
            "type": "integer",
            "const": 6,
            "description": "Always 6."
          }
        },
        "examples": [
          {
            "myr": "1000.00",
            "myrt": "1000.00",
            "feeMyr": "1.00",
            "amountRaw": "1000000000",
            "decimals": 6
          }
        ]
      },
      "Blockchain": {
        "type": "object",
        "description": "Both fields are null until the transaction is broadcast. A txHash alone is not final; wait for status completed.",
        "required": [
          "txHash",
          "blockNumber"
        ],
        "properties": {
          "txHash": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "0x..."
            ]
          },
          "blockNumber": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "20481922"
            ]
          }
        }
      },
      "Timestamps": {
        "type": "object",
        "description": "ISO 8601 UTC timestamps.",
        "required": [
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-09-10T04:12:33.918Z"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "null until the first update.",
            "examples": [
              "2026-09-10T04:19:02.441Z"
            ]
          }
        }
      },
      "OrderStatus": {
        "type": "string",
        "description": "Business truth. Drive your logic from this field. No new values will be added in v1.",
        "enum": [
          "payment_pending",
          "pending",
          "processing",
          "completed",
          "failed",
          "cancelled"
        ]
      },
      "OrderPhase": {
        "type": "string",
        "description": "Operational detail for support tooling and progress display. New values may be added without notice; handle unknown values. A cancelled order reports FAILED.",
        "enum": [
          "ORDER_CREATED",
          "PAYMENT_PENDING",
          "PENDING_APPROVAL",
          "AML_SCREENING",
          "BROADCASTING",
          "ON_CHAIN_CONFIRMED",
          "COMPLETED",
          "FAILED"
        ]
      },
      "Direction": {
        "type": "string",
        "enum": [
          "MINT",
          "REDEEM",
          "TRANSFER"
        ]
      },
      "MintCreateRequest": {
        "type": "object",
        "required": [
          "referenceId",
          "amountMyr",
          "walletAddress",
          "customerId"
        ],
        "properties": {
          "referenceId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9._:-]{8,100}$",
            "description": "Your unique handle for this order. Letters, digits, dot, underscore, dash, colon.",
            "examples": [
              "acme:mint:2026-09-10:00417"
            ]
          },
          "amountMyr": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,6})?$",
            "description": "Positive decimal, at most 6 decimal places."
          },
          "walletAddress": {
            "type": "string",
            "description": "Checksummed EVM address that receives MYRT.",
            "examples": [
              "0xAbC0000000000000000000000000000000000001"
            ]
          },
          "customerId": {
            "type": "string",
            "description": "A customer linked to your integration.",
            "examples": [
              "cus_9f2a3b4c"
            ]
          },
          "chainId": {
            "type": "integer",
            "description": "One of chains[].chainId from /config. Defaults to defaultChainId.",
            "examples": [
              1
            ]
          },
          "fiatConfirmed": {
            "type": "boolean",
            "default": false,
            "description": "true only once MYR has settled irreversibly. Requires mint:execute."
          }
        },
        "additionalProperties": false
      },
      "RedeemCreateRequest": {
        "type": "object",
        "required": [
          "referenceId",
          "amountMyrt",
          "walletAddress",
          "customerId"
        ],
        "properties": {
          "referenceId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9._:-]{8,100}$",
            "description": "Your unique handle for this order.",
            "examples": [
              "acme:redeem:2026-09-10:00092"
            ]
          },
          "amountMyrt": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,6})?$",
            "description": "Positive decimal, at most 6 decimal places."
          },
          "walletAddress": {
            "type": "string",
            "description": "Checksummed EVM address the MYRT is burned from.",
            "examples": [
              "0xAbC0000000000000000000000000000000000001"
            ]
          },
          "customerId": {
            "type": "string",
            "description": "Owner of the wallet, linked to your integration.",
            "examples": [
              "cus_9f2a3b4c"
            ]
          },
          "bankReference": {
            "type": "string",
            "description": "Your payout reference, echoed in reconciliation.",
            "examples": [
              "acme-payout-00092"
            ]
          },
          "chainId": {
            "type": "integer",
            "description": "Defaults to the active chain.",
            "examples": [
              1
            ]
          }
        },
        "additionalProperties": false
      },
      "TransferCreateRequest": {
        "type": "object",
        "required": [
          "referenceId",
          "amountMyrt",
          "walletAddress",
          "customerId"
        ],
        "properties": {
          "referenceId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9._:-]{8,100}$",
            "description": "Your unique handle for this order.",
            "examples": [
              "acme:transfer:2026-09-10:00031"
            ]
          },
          "amountMyrt": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,6})?$",
            "description": "Positive decimal, at most 6 decimal places. Capped per transaction and per key per UTC day; read the caps from error meta."
          },
          "walletAddress": {
            "type": "string",
            "description": "Recipient address.",
            "examples": [
              "0xAbC0000000000000000000000000000000000001"
            ]
          },
          "customerId": {
            "type": "string",
            "description": "Account the transfer is debited against.",
            "examples": [
              "cus_9f2a3b4c"
            ]
          },
          "chainId": {
            "type": "integer",
            "description": "Defaults to the active chain.",
            "examples": [
              1
            ]
          }
        },
        "additionalProperties": false
      },
      "Health": {
        "type": "object",
        "required": [
          "ok",
          "service",
          "apiVersion",
          "status",
          "timestamp"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "service": {
            "type": "string",
            "examples": [
              "myrt-api"
            ]
          },
          "apiVersion": {
            "type": "string",
            "examples": [
              "v1"
            ]
          },
          "status": {
            "type": "string",
            "examples": [
              "healthy"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-09-10T04:12:33.918Z"
            ]
          }
        }
      },
      "ServerTime": {
        "type": "object",
        "required": [
          "ok",
          "serverTime",
          "timezone"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "serverTime": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-09-10T04:12:33.918Z"
            ]
          },
          "timezone": {
            "type": "string",
            "const": "UTC"
          }
        }
      },
      "Config": {
        "type": "object",
        "required": [
          "ok",
          "apiVersion",
          "defaultChainId",
          "decimals",
          "chains",
          "endpoints"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "apiVersion": {
            "type": "string",
            "examples": [
              "v1"
            ]
          },
          "defaultChainId": {
            "type": "integer",
            "description": "Used when a request omits chainId.",
            "examples": [
              1
            ]
          },
          "decimals": {
            "type": "integer",
            "const": 6
          },
          "chains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chain"
            }
          },
          "endpoints": {
            "type": "object",
            "required": [
              "mints",
              "redeems",
              "transfers",
              "balances",
              "transactions"
            ],
            "properties": {
              "mints": {
                "type": "string",
                "examples": [
                  "/v1/mints"
                ]
              },
              "redeems": {
                "type": "string",
                "examples": [
                  "/v1/redeems"
                ]
              },
              "transfers": {
                "type": "string",
                "examples": [
                  "/v1/transfers"
                ]
              },
              "balances": {
                "type": "string",
                "examples": [
                  "/v1/balances/{walletAddress}"
                ]
              },
              "transactions": {
                "type": "string",
                "examples": [
                  "/v1/transactions/{referenceId}"
                ]
              }
            }
          }
        },
        "examples": [
          {
            "ok": true,
            "apiVersion": "v1",
            "defaultChainId": 1,
            "decimals": 6,
            "chains": [
              {
                "key": "ethereum",
                "name": "Ethereum",
                "chainId": 1,
                "caip2": "eip155:1",
                "nativeCurrency": {
                  "name": "Ether",
                  "symbol": "ETH",
                  "decimals": 18
                },
                "explorerBaseUrl": "https://etherscan.io",
                "explorerAddressUrl": "https://etherscan.io/address/",
                "explorerTxUrl": "https://etherscan.io/tx/",
                "confirmations": 15,
                "myrt": {
                  "address": "0x...",
                  "decimals": 6,
                  "name": "MYR Stablecoin",
                  "symbol": "MYRT"
                }
              }
            ],
            "endpoints": {
              "mints": "/v1/mints",
              "redeems": "/v1/redeems",
              "transfers": "/v1/transfers",
              "balances": "/v1/balances/{walletAddress}",
              "transactions": "/v1/transactions/{referenceId}"
            }
          }
        ]
      },
      "Chain": {
        "type": "object",
        "required": [
          "key",
          "name",
          "chainId",
          "caip2",
          "nativeCurrency",
          "explorerBaseUrl",
          "explorerAddressUrl",
          "explorerTxUrl",
          "confirmations",
          "myrt"
        ],
        "properties": {
          "key": {
            "type": "string",
            "examples": [
              "ethereum"
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "Ethereum"
            ]
          },
          "chainId": {
            "type": "integer",
            "examples": [
              1
            ]
          },
          "caip2": {
            "type": "string",
            "examples": [
              "eip155:1"
            ]
          },
          "nativeCurrency": {
            "type": "object",
            "required": [
              "name",
              "symbol",
              "decimals"
            ],
            "properties": {
              "name": {
                "type": "string",
                "examples": [
                  "Ether"
                ]
              },
              "symbol": {
                "type": "string",
                "examples": [
                  "ETH"
                ]
              },
              "decimals": {
                "type": "integer",
                "examples": [
                  18
                ]
              }
            }
          },
          "explorerBaseUrl": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://etherscan.io"
            ]
          },
          "explorerAddressUrl": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://etherscan.io/address/"
            ]
          },
          "explorerTxUrl": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://etherscan.io/tx/"
            ]
          },
          "confirmations": {
            "type": "integer",
            "description": "Confirmations required before an order is completed on this chain.",
            "examples": [
              15
            ]
          },
          "myrt": {
            "type": "object",
            "required": [
              "address",
              "decimals",
              "name",
              "symbol"
            ],
            "properties": {
              "address": {
                "type": "string",
                "description": "The MYRT contract on this chain.",
                "examples": [
                  "0x..."
                ]
              },
              "decimals": {
                "type": "integer",
                "const": 6
              },
              "name": {
                "type": "string",
                "examples": [
                  "MYR Stablecoin"
                ]
              },
              "symbol": {
                "type": "string",
                "examples": [
                  "MYRT"
                ]
              }
            }
          }
        },
        "examples": [
          {
            "key": "ethereum",
            "name": "Ethereum",
            "chainId": 1,
            "caip2": "eip155:1",
            "nativeCurrency": {
              "name": "Ether",
              "symbol": "ETH",
              "decimals": 18
            },
            "explorerBaseUrl": "https://etherscan.io",
            "explorerAddressUrl": "https://etherscan.io/address/",
            "explorerTxUrl": "https://etherscan.io/tx/",
            "confirmations": 15,
            "myrt": {
              "address": "0x...",
              "decimals": 6,
              "name": "MYR Stablecoin",
              "symbol": "MYRT"
            }
          }
        ]
      },
      "TokenList": {
        "type": "object",
        "required": [
          "ok",
          "tokens"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Token"
            }
          }
        },
        "examples": [
          {
            "ok": true,
            "tokens": [
              {
                "symbol": "MYRT",
                "name": "MYR Stablecoin",
                "chainId": 1,
                "network": "Ethereum",
                "tokenAddress": "0x...",
                "decimals": 6,
                "explorerUrl": "https://etherscan.io/address/0x..."
              }
            ]
          }
        ]
      },
      "Token": {
        "type": "object",
        "required": [
          "symbol",
          "name",
          "chainId",
          "network",
          "tokenAddress",
          "decimals",
          "explorerUrl"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "examples": [
              "MYRT"
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "MYR Stablecoin"
            ]
          },
          "chainId": {
            "type": "integer",
            "examples": [
              1
            ]
          },
          "network": {
            "type": "string",
            "examples": [
              "Ethereum"
            ]
          },
          "tokenAddress": {
            "type": "string",
            "examples": [
              "0x..."
            ]
          },
          "decimals": {
            "type": "integer",
            "const": 6
          },
          "explorerUrl": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://etherscan.io/address/0x..."
            ]
          }
        },
        "examples": [
          {
            "symbol": "MYRT",
            "name": "MYR Stablecoin",
            "chainId": 1,
            "network": "Ethereum",
            "tokenAddress": "0x...",
            "decimals": 6,
            "explorerUrl": "https://etherscan.io/address/0x..."
          }
        ]
      },
      "BalanceResponse": {
        "type": "object",
        "required": [
          "ok",
          "walletAddress",
          "balances"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "walletAddress": {
            "type": "string",
            "description": "Returned checksummed.",
            "examples": [
              "0xAbC0000000000000000000000000000000000001"
            ]
          },
          "balances": {
            "type": "array",
            "description": "One entry per chain, or one entry when chainId was given.",
            "items": {
              "$ref": "#/components/schemas/Balance"
            }
          }
        },
        "examples": [
          {
            "ok": true,
            "walletAddress": "0xAbC0000000000000000000000000000000000001",
            "balances": [
              {
                "chainId": 1,
                "network": "Ethereum",
                "tokenAddress": "0x...",
                "symbol": "MYRT",
                "decimals": 6,
                "balanceRaw": "212400000",
                "balance": "212.4"
              }
            ]
          }
        ]
      },
      "Balance": {
        "type": "object",
        "required": [
          "chainId",
          "network",
          "tokenAddress",
          "symbol",
          "decimals",
          "balanceRaw",
          "balance"
        ],
        "properties": {
          "chainId": {
            "type": "integer",
            "examples": [
              1
            ]
          },
          "network": {
            "type": "string",
            "examples": [
              "Ethereum"
            ]
          },
          "tokenAddress": {
            "type": "string",
            "examples": [
              "0x..."
            ]
          },
          "symbol": {
            "type": "string",
            "examples": [
              "MYRT"
            ]
          },
          "decimals": {
            "type": "integer",
            "const": 6
          },
          "balanceRaw": {
            "type": "string",
            "description": "The exact on-chain integer.",
            "examples": [
              "212400000"
            ]
          },
          "balance": {
            "type": "string",
            "description": "Decimal string, not zero-padded.",
            "examples": [
              "212.4"
            ]
          }
        }
      },
      "TransactionList": {
        "type": "object",
        "required": [
          "ok",
          "transactions",
          "nextCursor"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "transactions": {
            "type": "array",
            "description": "Newest first.",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor to fetch the next page. null on the final page."
          }
        },
        "examples": [
          {
            "ok": true,
            "transactions": [
              {
                "ok": true,
                "referenceId": "acme:mint:2026-09-10:00417",
                "status": "completed",
                "phase": "COMPLETED",
                "direction": "MINT",
                "chainId": 1,
                "network": "Ethereum",
                "tokenAddress": "0x...",
                "walletAddress": "0xAbC0000000000000000000000000000000000001",
                "amounts": {
                  "myr": "1000.00",
                  "myrt": "1000.00",
                  "feeMyr": "1.00",
                  "amountRaw": "1000000000",
                  "decimals": 6
                },
                "blockchain": {
                  "txHash": "0x...",
                  "blockNumber": "20481922"
                },
                "timestamps": {
                  "createdAt": "2026-09-10T04:12:33.918Z",
                  "updatedAt": "2026-09-10T04:19:02.441Z"
                }
              }
            ],
            "nextCursor": null
          }
        ]
      },
      "Customer": {
        "type": "object",
        "description": "Verification status of a customer linked to your integration. Never contains names, contact details, identity numbers, documents, addresses or device data.",
        "required": [
          "ok",
          "customerId",
          "accountType",
          "verification",
          "residency",
          "limits",
          "capabilities",
          "createdAt"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "customerId": {
            "type": "string",
            "examples": [
              "cus_9f2a3b4c"
            ]
          },
          "accountType": {
            "type": "string",
            "enum": [
              "RETAIL",
              "ENTERPRISE"
            ]
          },
          "verification": {
            "type": "object",
            "required": [
              "status",
              "level",
              "verifiedAt"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "UNVERIFIED",
                  "PENDING",
                  "VERIFIED",
                  "REJECTED",
                  "SUSPENDED"
                ]
              },
              "level": {
                "type": "string",
                "description": "A tier label. New labels may appear.",
                "examples": [
                  "TIER_2"
                ]
              },
              "verifiedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "null unless status is VERIFIED.",
                "examples": [
                  "2026-04-02T09:11:00.000Z"
                ]
              }
            }
          },
          "residency": {
            "type": "object",
            "required": [
              "countryCode",
              "isResident"
            ],
            "properties": {
              "countryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2.",
                "examples": [
                  "MY"
                ]
              },
              "isResident": {
                "type": "boolean"
              }
            }
          },
          "limits": {
            "type": "object",
            "required": [
              "currency",
              "monthlyWithdrawalCap",
              "monthlyWithdrawalUsed",
              "monthlyWithdrawalRemaining"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "examples": [
                  "MYR"
                ]
              },
              "monthlyWithdrawalCap": {
                "type": "string",
                "description": "Decimal string in MYR."
              },
              "monthlyWithdrawalUsed": {
                "type": "string",
                "description": "Decimal string in MYR."
              },
              "monthlyWithdrawalRemaining": {
                "type": "string",
                "description": "Decimal string in MYR."
              }
            }
          },
          "capabilities": {
            "type": "object",
            "required": [
              "canMint",
              "canRedeem",
              "canTransfer"
            ],
            "properties": {
              "canMint": {
                "type": "boolean"
              },
              "canRedeem": {
                "type": "boolean"
              },
              "canTransfer": {
                "type": "boolean"
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-04-01T02:20:14.000Z"
            ]
          }
        },
        "examples": [
          {
            "ok": true,
            "customerId": "cus_9f2a3b4c",
            "accountType": "RETAIL",
            "verification": {
              "status": "VERIFIED",
              "level": "TIER_2",
              "verifiedAt": "2026-04-02T09:11:00.000Z"
            },
            "residency": {
              "countryCode": "MY",
              "isResident": true
            },
            "limits": {
              "currency": "MYR",
              "monthlyWithdrawalCap": "50000.00",
              "monthlyWithdrawalUsed": "12500.00",
              "monthlyWithdrawalRemaining": "37500.00"
            },
            "capabilities": {
              "canMint": true,
              "canRedeem": true,
              "canTransfer": true
            },
            "createdAt": "2026-04-01T02:20:14.000Z"
          }
        ]
      },
      "Corporate": {
        "type": "object",
        "description": "Verification status of a corporate linked to your integration. Never contains contact details, registered addresses, documents or internal identifiers.",
        "required": [
          "ok",
          "corporateId",
          "companyName",
          "verification",
          "jurisdiction",
          "industry",
          "capabilities",
          "createdAt"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "corporateId": {
            "type": "string",
            "examples": [
              "cor_71bd5e29"
            ]
          },
          "companyName": {
            "type": "string",
            "examples": [
              "Acme Sdn Bhd"
            ]
          },
          "verification": {
            "type": "object",
            "required": [
              "status",
              "stage",
              "verifiedAt"
            ],
            "properties": {
              "status": {
                "type": "string",
                "examples": [
                  "VERIFIED"
                ]
              },
              "stage": {
                "type": "string",
                "examples": [
                  "COMPLETE"
                ]
              },
              "verifiedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "examples": [
                  "2026-05-18T03:44:00.000Z"
                ]
              }
            }
          },
          "jurisdiction": {
            "type": "object",
            "required": [
              "countryCode"
            ],
            "properties": {
              "countryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2.",
                "examples": [
                  "MY"
                ]
              }
            }
          },
          "industry": {
            "type": "string",
            "examples": [
              "Payments"
            ]
          },
          "capabilities": {
            "type": "object",
            "required": [
              "canMint",
              "canRedeem",
              "canPayroll"
            ],
            "properties": {
              "canMint": {
                "type": "boolean"
              },
              "canRedeem": {
                "type": "boolean"
              },
              "canPayroll": {
                "type": "boolean"
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-05-02T01:02:03.000Z"
            ]
          }
        },
        "examples": [
          {
            "ok": true,
            "corporateId": "cor_71bd5e29",
            "companyName": "Acme Sdn Bhd",
            "verification": {
              "status": "VERIFIED",
              "stage": "COMPLETE",
              "verifiedAt": "2026-05-18T03:44:00.000Z"
            },
            "jurisdiction": {
              "countryCode": "MY"
            },
            "industry": "Payments",
            "capabilities": {
              "canMint": true,
              "canRedeem": true,
              "canPayroll": true
            },
            "createdAt": "2026-05-02T01:02:03.000Z"
          }
        ]
      },
      "Error": {
        "type": "object",
        "description": "Every error body. Branch on error.code; message is for humans and may be reworded at any time.",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ErrorCode"
              },
              "message": {
                "type": "string",
                "description": "Human-readable and subject to change."
              },
              "meta": {
                "type": "object",
                "description": "Present only where documented for the code.",
                "additionalProperties": true
              }
            }
          }
        },
        "examples": [
          {
            "ok": false,
            "error": {
              "code": "INSUFFICIENT_BALANCE",
              "message": "Wallet has insufficient MYRT balance for redemption.",
              "meta": {
                "requestedMyrt": "500.00",
                "walletBalanceMyrt": "212.40"
              }
            }
          }
        ]
      },
      "ErrorCode": {
        "type": "string",
        "description": "Stable codes that integrations branch on. New codes may be added in v1.",
        "enum": [
          "UNAUTHORIZED",
          "IP_NOT_ALLOWED",
          "SCOPE_DENIED",
          "RATE_LIMITED",
          "BAD_REQUEST",
          "INVALID_JSON",
          "IDEMPOTENCY_KEY_REQUIRED",
          "IDEMPOTENCY_CONFLICT",
          "INVALID_AMOUNT",
          "INVALID_WALLET_ADDRESS",
          "INVALID_REFERENCE_ID",
          "NOT_FOUND",
          "CUSTOMER_NOT_VERIFIED",
          "POLICY_REJECTED",
          "AMOUNT_NEGATIVE_OR_ZERO",
          "AMOUNT_BELOW_FLOOR",
          "AMOUNT_ABOVE_REDEEM_CEILING",
          "FOREIGNER_LIMIT_EXCEEDED",
          "INSUFFICIENT_BALANCE",
          "MONTHLY_WITHDRAWAL_LIMIT_EXCEEDED",
          "TRANSFER_PER_TX_CAP_EXCEEDED",
          "TRANSFER_DAILY_CAP_EXCEEDED",
          "RECIPIENT_NOT_PERMITTED",
          "ORDER_NOT_CANCELLABLE",
          "SETTLEMENT_FAILED",
          "SERVER_ERROR"
        ]
      }
    }
  },
  "x-myrt-scopes": {
    "mint:create": "Create a mint order (fiatConfirmed: false).",
    "mint:execute": "Submit a fiat-confirmed mint for settlement (fiatConfirmed: true).",
    "mint:read": "Read mint orders.",
    "redeem:create": "Create a redeem order.",
    "redeem:execute": "Submit a redeem burn for settlement.",
    "redeem:read": "Read redeem orders.",
    "transfer:create": "Create a transfer.",
    "transfer:execute": "Submit a transfer for settlement.",
    "transfer:read": "Read transfers.",
    "balance:read": "Read on-chain MYRT balances.",
    "transaction:read": "Read and list every order you created, any direction.",
    "account:read": "Read customer and corporate verification status. Granted only under a signed data processing agreement.",
    "config:read": "Read network and token configuration."
  },
  "x-myrt-rate-limits": {
    "read": 120,
    "write": 30,
    "balance": 60
  }
}
