{
  "openapi": "3.1.0",
  "info": {
    "title": "AnyBanQ Pay API",
    "version": "0.1.0",
    "summary": "The merchant-facing endpoints behind the AnyBanQ Pay server library.",
    "description": "Remittance quotes and orders, payout batches, bills and payment links, verification sessions, and the webhooks they send.\n\nThis document is written by hand and covers only these endpoints. It is not the full API reference.\n\n**Authentication.** Send your API key as `Authorization: Bearer divp_test_…` or `divp_live_…`, from your server only.\n\n**Money.** Remittance amounts are strings of minor units (`\"10000\"` is 100.00). Bills, payment links and payout batches use major units: JSON numbers in responses, and for payout rows a decimal string such as `\"85000.00\"`.\n\n**What is live.** Collection from a Sri Lankan bank account is live on HNB JustPay. Card collection and real payouts are not live, and remittance runs in test mode: orders carry `sandbox: true` and payouts are recorded as `DRY_RUN`.\n\n**A test key makes test records.** A bill, payment link, subscription plan or payout batch made with a `divp_test_` key carries `test: true`. It is sent to nobody, it cannot be paid or funded for real, a test key lists test records only, and a live key or the console lists live ones only. Its webhooks still fire and carry `test: true` in `data`. A remittance order made with a test key is always a sandbox order (`sandbox: true`), or is refused where the sandbox rail is off. A test key works before your account is approved.\n\n**Verification works the same way.** A check run with a test key, or a step of a hosted verification started with one, is a test record marked `test: true`: no provider is contacted, nobody is messaged and nothing is metered. A one-time code comes back in the response as `devCode`, a bank account step accepts `123456`, and the last four digits of the NIC or account number choose the outcome. A test check tells you nothing about a real person.\n\n**Scopes.** A key restricted to scopes can reach only what they cover: `bills` for bills, payment links and subscription plans, `remittance` for remittance, `payouts` for payout batches, `verifications` for verification. A key with no scopes is not narrowed. No key can manage keys, webhooks, the team or settings: that is done in the console.\n\nGuide: https://verifia.anybanq.lk/developers/pay"
  },
  "servers": [
    {
      "url": "{baseUrl}",
      "description": "The API host. Paths below include the /v1 prefix.",
      "variables": {
        "baseUrl": {
          "default": "https://verifia.anybanq.lk"
        }
      }
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Remittance",
      "description": "Needs the Remittance orders service switched on, and the `remittance` scope on a scoped key (the `verifications` scope no longer covers it). A test key makes sandbox orders only."
    },
    {
      "name": "Bulk payouts",
      "description": "Needs the Bulk payouts service switched on, and the `payouts` scope on a scoped key. A key can create and read a batch; it can never approve one. A batch made with a test key is a test batch: it is only ever simulated."
    },
    {
      "name": "Collection",
      "description": "Bills and payment links, paid on the hosted pay page. Needs the Bill issued service, and the `bills` scope on a scoped key. Made with a test key they are test records, paid by simulation only."
    },
    {
      "name": "Verification",
      "description": "Hosted identity verification from a published workflow. Needs the `verifications` scope on a scoped key."
    },
    {
      "name": "Webhooks",
      "description": "What we POST to your endpoint. Register endpoints in the console under Webhooks."
    }
  ],
  "paths": {
    "/v1/remittance/quotes": {
      "post": {
        "operationId": "createRemittanceQuote",
        "tags": [
          "Remittance"
        ],
        "summary": "Price a transfer",
        "description": "The rate is held until `rateExpiresAt` (five minutes by default). Give `sendAmountMinor` or `receiveAmountMinor`, not both. `sourceCurrency` must be your organisation's charge currency.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              },
              "example": {
                "sourceCurrency": "USD",
                "sendAmountMinor": "10000",
                "displayCurrency": "GBP"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The quote.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemittanceQuote"
                },
                "example": {
                  "id": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                  "fixedSide": "SEND",
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "fee": {
                    "amountMinor": "250",
                    "currency": "USD"
                  },
                  "total": {
                    "amountMinor": "10250",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "rate": "298.75",
                  "midRate": "301.00",
                  "marginBps": 75,
                  "feeBps": 150,
                  "feeFixedMinor": "100",
                  "rateSource": "ENV",
                  "rateDate": null,
                  "rateExpiresAt": "2026-10-10T08:05:00.000Z",
                  "chargeCurrency": "USD",
                  "indicative": {
                    "amountMinor": "7810",
                    "currency": "GBP",
                    "estimate": true
                  },
                  "payoutTiming": "AFTER_SETTLEMENT",
                  "createdAt": "2026-10-10T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/remittance/orders": {
      "post": {
        "operationId": "createRemittanceOrder",
        "tags": [
          "Remittance"
        ],
        "summary": "Make an order from a live quote",
        "description": "Idempotent on `externalRef`: a repeat with the same `externalRef` and `quoteId` returns the order made the first time, again with 201. The same `externalRef` with a different quote answers 409. Hand `checkoutToken` to the browser, never the API key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "example": {
                "quoteId": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                "externalRef": "transfer-1001",
                "payee": {
                  "kind": "ACCOUNT",
                  "bankCode": "7083",
                  "accountNumber": "0000123456789",
                  "name": "Sample Payee"
                },
                "sender": {
                  "name": "Sample Sender",
                  "country": "GB",
                  "dob": "1990-04-12"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The order, with its checkout token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemittanceOrder"
                },
                "example": {
                  "id": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "quoteId": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                  "status": "AWAITING_PAYMENT",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "fee": {
                    "amountMinor": "250",
                    "currency": "USD"
                  },
                  "total": {
                    "amountMinor": "10250",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "rate": "298.75",
                  "rateExpiresAt": "2026-10-10T08:05:00.000Z",
                  "indicative": {
                    "amountMinor": "7810",
                    "currency": "GBP",
                    "estimate": true
                  },
                  "payee": {
                    "kind": "ACCOUNT",
                    "displayName": "Sample Payee",
                    "bankName": "Seylan Bank PLC",
                    "accountMasked": "****6789",
                    "bankCode": "7083",
                    "handle": null
                  },
                  "sender": {
                    "name": "Sample Sender",
                    "country": "GB",
                    "verificationSessionId": null
                  },
                  "screening": {
                    "status": "CLEAR",
                    "reviewDecision": null,
                    "reviewedAt": null
                  },
                  "collection": {
                    "rail": "MOCK_CARD",
                    "mode": "redirect",
                    "reference": null
                  },
                  "payout": {
                    "status": null,
                    "reference": null,
                    "providerRef": null,
                    "message": null,
                    "timing": "AFTER_SETTLEMENT",
                    "awaitingSettlement": false
                  },
                  "settlement": {
                    "state": "NOT_DUE",
                    "settledAt": null,
                    "amount": null,
                    "reference": null,
                    "importId": null
                  },
                  "failureReason": null,
                  "createdAt": "2026-10-10T08:00:30.000Z",
                  "payingAt": null,
                  "collectedAt": null,
                  "settledAt": null,
                  "payoutInstructedAt": null,
                  "completedAt": null,
                  "failedAt": null,
                  "expiredAt": null,
                  "cancelledAt": null,
                  "checkoutToken": "EXAMPLE_CHECKOUT_TOKEN_not_a_real_one",
                  "checkoutUrl": "https://verifia.anybanq.lk/remit/EXAMPLE_CHECKOUT_TOKEN_not_a_real_one"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      },
      "get": {
        "operationId": "listRemittanceOrders",
        "tags": [
          "Remittance"
        ],
        "summary": "List orders",
        "description": "Newest first, without checkout tokens.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/RemittanceOrderStatus"
            }
          },
          {
            "name": "settlement",
            "in": "query",
            "required": false,
            "description": "AWAITING: authorised by the bank and not yet settled. PAID_OUT_UNSETTLED: of those, the ones whose recipient was already paid. Either lists the longest-waiting first.",
            "schema": {
              "type": "string",
              "enum": [
                "AWAITING",
                "PAID_OUT_UNSETTLED"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1-based. Defaults to 1.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Defaults to 25.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of orders.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemittanceOrderPage"
                },
                "example": {
                  "items": [
                    {
                      "id": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                      "externalRef": "transfer-1001",
                      "quoteId": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                      "status": "AWAITING_PAYMENT",
                      "sandbox": true,
                      "send": {
                        "amountMinor": "10000",
                        "currency": "USD"
                      },
                      "fee": {
                        "amountMinor": "250",
                        "currency": "USD"
                      },
                      "total": {
                        "amountMinor": "10250",
                        "currency": "USD"
                      },
                      "receive": {
                        "amountMinor": "2987500",
                        "currency": "LKR"
                      },
                      "rate": "298.75",
                      "rateExpiresAt": "2026-10-10T08:05:00.000Z",
                      "indicative": {
                        "amountMinor": "7810",
                        "currency": "GBP",
                        "estimate": true
                      },
                      "payee": {
                        "kind": "ACCOUNT",
                        "displayName": "Sample Payee",
                        "bankName": "Seylan Bank PLC",
                        "accountMasked": "****6789",
                        "bankCode": "7083",
                        "handle": null
                      },
                      "sender": {
                        "name": "Sample Sender",
                        "country": "GB",
                        "verificationSessionId": null
                      },
                      "screening": {
                        "status": "CLEAR",
                        "reviewDecision": null,
                        "reviewedAt": null
                      },
                      "collection": {
                        "rail": "MOCK_CARD",
                        "mode": "redirect",
                        "reference": null
                      },
                      "payout": {
                        "status": null,
                        "reference": null,
                        "providerRef": null,
                        "message": null,
                        "timing": "AFTER_SETTLEMENT",
                        "awaitingSettlement": false
                      },
                      "settlement": {
                        "state": "NOT_DUE",
                        "settledAt": null,
                        "amount": null,
                        "reference": null,
                        "importId": null
                      },
                      "failureReason": null,
                      "createdAt": "2026-10-10T08:00:30.000Z",
                      "payingAt": null,
                      "collectedAt": null,
                      "settledAt": null,
                      "payoutInstructedAt": null,
                      "completedAt": null,
                      "failedAt": null,
                      "expiredAt": null,
                      "cancelledAt": null
                    }
                  ],
                  "total": 1,
                  "page": 1,
                  "pageSize": 25
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/remittance/orders/{id}": {
      "get": {
        "operationId": "getRemittanceOrder",
        "tags": [
          "Remittance"
        ],
        "summary": "Read one order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The order id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order, with its checkout token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemittanceOrder"
                },
                "example": {
                  "id": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "quoteId": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                  "status": "AWAITING_PAYMENT",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "fee": {
                    "amountMinor": "250",
                    "currency": "USD"
                  },
                  "total": {
                    "amountMinor": "10250",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "rate": "298.75",
                  "rateExpiresAt": "2026-10-10T08:05:00.000Z",
                  "indicative": {
                    "amountMinor": "7810",
                    "currency": "GBP",
                    "estimate": true
                  },
                  "payee": {
                    "kind": "ACCOUNT",
                    "displayName": "Sample Payee",
                    "bankName": "Seylan Bank PLC",
                    "accountMasked": "****6789",
                    "bankCode": "7083",
                    "handle": null
                  },
                  "sender": {
                    "name": "Sample Sender",
                    "country": "GB",
                    "verificationSessionId": null
                  },
                  "screening": {
                    "status": "CLEAR",
                    "reviewDecision": null,
                    "reviewedAt": null
                  },
                  "collection": {
                    "rail": "MOCK_CARD",
                    "mode": "redirect",
                    "reference": null
                  },
                  "payout": {
                    "status": null,
                    "reference": null,
                    "providerRef": null,
                    "message": null,
                    "timing": "AFTER_SETTLEMENT",
                    "awaitingSettlement": false
                  },
                  "settlement": {
                    "state": "NOT_DUE",
                    "settledAt": null,
                    "amount": null,
                    "reference": null,
                    "importId": null
                  },
                  "failureReason": null,
                  "createdAt": "2026-10-10T08:00:30.000Z",
                  "payingAt": null,
                  "collectedAt": null,
                  "settledAt": null,
                  "payoutInstructedAt": null,
                  "completedAt": null,
                  "failedAt": null,
                  "expiredAt": null,
                  "cancelledAt": null,
                  "checkoutToken": "EXAMPLE_CHECKOUT_TOKEN_not_a_real_one",
                  "checkoutUrl": "https://verifia.anybanq.lk/remit/EXAMPLE_CHECKOUT_TOKEN_not_a_real_one"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/v1/remittance/orders/{id}/cancel": {
      "post": {
        "operationId": "cancelRemittanceOrder",
        "tags": [
          "Remittance"
        ],
        "summary": "Cancel an order the sender has not started paying",
        "description": "Cancelling twice is harmless. An order that is PAYING or later answers 409.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The order id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The cancelled order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemittanceOrder"
                },
                "example": {
                  "id": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "quoteId": "7a1e2c54-0b6d-4f1a-9c1e-2f5b8d3a6e10",
                  "status": "CANCELLED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "fee": {
                    "amountMinor": "250",
                    "currency": "USD"
                  },
                  "total": {
                    "amountMinor": "10250",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "rate": "298.75",
                  "rateExpiresAt": "2026-10-10T08:05:00.000Z",
                  "indicative": {
                    "amountMinor": "7810",
                    "currency": "GBP",
                    "estimate": true
                  },
                  "payee": {
                    "kind": "ACCOUNT",
                    "displayName": "Sample Payee",
                    "bankName": "Seylan Bank PLC",
                    "accountMasked": "****6789",
                    "bankCode": "7083",
                    "handle": null
                  },
                  "sender": {
                    "name": "Sample Sender",
                    "country": "GB",
                    "verificationSessionId": null
                  },
                  "screening": {
                    "status": "CLEAR",
                    "reviewDecision": null,
                    "reviewedAt": null
                  },
                  "collection": {
                    "rail": "MOCK_CARD",
                    "mode": "redirect",
                    "reference": null
                  },
                  "payout": {
                    "status": null,
                    "reference": null,
                    "providerRef": null,
                    "message": null,
                    "timing": "AFTER_SETTLEMENT",
                    "awaitingSettlement": false
                  },
                  "settlement": {
                    "state": "NOT_DUE",
                    "settledAt": null,
                    "amount": null,
                    "reference": null,
                    "importId": null
                  },
                  "failureReason": null,
                  "createdAt": "2026-10-10T08:00:30.000Z",
                  "payingAt": null,
                  "collectedAt": null,
                  "settledAt": null,
                  "payoutInstructedAt": null,
                  "completedAt": null,
                  "failedAt": null,
                  "expiredAt": null,
                  "cancelledAt": "2026-10-10T08:02:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          }
        }
      }
    },
    "/v1/payout-batches": {
      "post": {
        "operationId": "createPayoutBatch",
        "tags": [
          "Bulk payouts"
        ],
        "summary": "Create a payout batch from JSON rows",
        "description": "Up to 500 rows; five calls a minute. A bad row is reported on its own (status INVALID, with `issues`) and left out of the total. Nothing is paid until a person approves the batch in the console and the bank confirms the funds. **An API key cannot approve a batch.** There is no idempotency key: a repeat is accepted and flagged with `repeatOf`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePayoutBatchRequest"
              },
              "example": {
                "name": "October redemptions",
                "rows": [
                  {
                    "payeeName": "Sample Payee One",
                    "bankCode": "7010",
                    "accountNumber": "0000123456",
                    "amount": "85000.00",
                    "reference": "RED-1"
                  },
                  {
                    "payeeName": "Sample Payee Two",
                    "bankCode": "7083",
                    "accountNumber": "0000654321",
                    "amount": "120000.00",
                    "reference": "RED-2"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The batch with every row.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatch"
                },
                "example": {
                  "id": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "name": "October redemptions",
                  "status": "AWAITING_APPROVAL",
                  "amountMode": "LKR",
                  "currency": "LKR",
                  "payerCurrency": null,
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "rowCount": 2,
                  "validCount": 2,
                  "invalidCount": 0,
                  "totalAmount": 205000,
                  "totalAmountLkr": 205000,
                  "quote": null,
                  "bankRate": null,
                  "approvedAt": null,
                  "fundedAt": null,
                  "fundedAmountLkr": null,
                  "executedAt": null,
                  "completedAt": null,
                  "createdById": null,
                  "payeeListId": null,
                  "repeatOfBatchId": null,
                  "paymentsLive": false,
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "createdBy": null,
                  "createdByApiKey": true,
                  "approvedBy": null,
                  "rejectedBy": null,
                  "rejectionReason": null,
                  "repeatOf": null,
                  "rows": [
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e51",
                      "rowNumber": 1,
                      "payeeName": "Sample Payee One",
                      "bankCode": "7010",
                      "bankName": "Bank of Ceylon",
                      "accountNumber": "0000123456",
                      "amount": 85000,
                      "currency": "LKR",
                      "amountLkr": 85000,
                      "reference": "RED-1",
                      "status": "READY",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0001",
                      "providerRef": null,
                      "message": null,
                      "paidAt": null,
                      "returnedAt": null
                    },
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e52",
                      "rowNumber": 2,
                      "payeeName": "Sample Payee Two",
                      "bankCode": "7083",
                      "bankName": "Seylan Bank PLC",
                      "accountNumber": "0000654321",
                      "amount": 120000,
                      "currency": "LKR",
                      "amountLkr": 120000,
                      "reference": "RED-2",
                      "status": "READY",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0002",
                      "providerRef": null,
                      "message": null,
                      "paidAt": null,
                      "returnedAt": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      },
      "get": {
        "operationId": "listPayoutBatches",
        "tags": [
          "Bulk payouts"
        ],
        "summary": "List the latest 100 batches",
        "description": "Newest first, without rows. Takes no parameters.",
        "responses": {
          "200": {
            "description": "Batch summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PayoutBatchSummary"
                  }
                },
                "example": [
                  {
                    "id": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                    "name": "October redemptions",
                    "status": "AWAITING_APPROVAL",
                    "amountMode": "LKR",
                    "currency": "LKR",
                    "payerCurrency": null,
                    "fundingReference": "VPB0A1B2C3D4E5F",
                    "rowCount": 2,
                    "validCount": 2,
                    "invalidCount": 0,
                    "totalAmount": 205000,
                    "totalAmountLkr": 205000,
                    "quote": null,
                    "bankRate": null,
                    "approvedAt": null,
                    "fundedAt": null,
                    "fundedAmountLkr": null,
                    "executedAt": null,
                    "completedAt": null,
                    "createdById": null,
                    "payeeListId": null,
                    "repeatOfBatchId": null,
                    "paymentsLive": false,
                    "createdAt": "2026-10-10T08:00:00.000Z"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/payout-batches/{id}": {
      "get": {
        "operationId": "getPayoutBatch",
        "tags": [
          "Bulk payouts"
        ],
        "summary": "Read one batch with every row",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The batch id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatch"
                },
                "example": {
                  "id": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "name": "October redemptions",
                  "status": "AWAITING_APPROVAL",
                  "amountMode": "LKR",
                  "currency": "LKR",
                  "payerCurrency": null,
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "rowCount": 2,
                  "validCount": 2,
                  "invalidCount": 0,
                  "totalAmount": 205000,
                  "totalAmountLkr": 205000,
                  "quote": null,
                  "bankRate": null,
                  "approvedAt": null,
                  "fundedAt": null,
                  "fundedAmountLkr": null,
                  "executedAt": null,
                  "completedAt": null,
                  "createdById": null,
                  "payeeListId": null,
                  "repeatOfBatchId": null,
                  "paymentsLive": false,
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "createdBy": null,
                  "createdByApiKey": true,
                  "approvedBy": null,
                  "rejectedBy": null,
                  "rejectionReason": null,
                  "repeatOf": null,
                  "rows": [
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e51",
                      "rowNumber": 1,
                      "payeeName": "Sample Payee One",
                      "bankCode": "7010",
                      "bankName": "Bank of Ceylon",
                      "accountNumber": "0000123456",
                      "amount": 85000,
                      "currency": "LKR",
                      "amountLkr": 85000,
                      "reference": "RED-1",
                      "status": "READY",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0001",
                      "providerRef": null,
                      "message": null,
                      "paidAt": null,
                      "returnedAt": null
                    },
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e52",
                      "rowNumber": 2,
                      "payeeName": "Sample Payee Two",
                      "bankCode": "7083",
                      "bankName": "Seylan Bank PLC",
                      "accountNumber": "0000654321",
                      "amount": 120000,
                      "currency": "LKR",
                      "amountLkr": 120000,
                      "reference": "RED-2",
                      "status": "READY",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0002",
                      "providerRef": null,
                      "message": null,
                      "paidAt": null,
                      "returnedAt": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/v1/payout-batches/{id}/simulate": {
      "post": {
        "operationId": "simulatePayoutBatch",
        "tags": [
          "Bulk payouts"
        ],
        "summary": "Run a test batch to its end, with no bank involved",
        "description": "Test keys only, and only for a batch made with one. Every valid row becomes `DRY_RUN`, the batch completes as `DRY_RUN`, and `payout_batch.completed` is sent with `test: true`. It stands in for the approval, the funding and the send and does none of them: nothing is approved, nothing is marked funded and no bank is instructed. A live key answers 400; a batch that is not a test batch answers 404.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The batch id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The completed test batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatch"
                },
                "example": {
                  "id": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "name": "October redemptions",
                  "status": "DRY_RUN",
                  "amountMode": "LKR",
                  "currency": "LKR",
                  "payerCurrency": null,
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "rowCount": 2,
                  "validCount": 2,
                  "invalidCount": 0,
                  "totalAmount": 205000,
                  "totalAmountLkr": 205000,
                  "quote": null,
                  "bankRate": null,
                  "approvedAt": null,
                  "fundedAt": null,
                  "fundedAmountLkr": null,
                  "executedAt": "2026-10-10T08:05:00.000Z",
                  "completedAt": "2026-10-10T08:05:00.000Z",
                  "createdById": null,
                  "payeeListId": null,
                  "repeatOfBatchId": null,
                  "paymentsLive": false,
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "createdBy": null,
                  "createdByApiKey": true,
                  "approvedBy": null,
                  "rejectedBy": null,
                  "rejectionReason": null,
                  "repeatOf": null,
                  "rows": [
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e51",
                      "rowNumber": 1,
                      "payeeName": "Sample Payee One",
                      "bankCode": "7010",
                      "bankName": "Bank of Ceylon",
                      "accountNumber": "0000123456",
                      "amount": 85000,
                      "currency": "LKR",
                      "amountLkr": 85000,
                      "reference": "RED-1",
                      "status": "DRY_RUN",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0001",
                      "providerRef": null,
                      "message": "Test batch: simulated, no money was sent",
                      "paidAt": null,
                      "returnedAt": null
                    },
                    {
                      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e52",
                      "rowNumber": 2,
                      "payeeName": "Sample Payee Two",
                      "bankCode": "7083",
                      "bankName": "Seylan Bank PLC",
                      "accountNumber": "0000654321",
                      "amount": 120000,
                      "currency": "LKR",
                      "amountLkr": 120000,
                      "reference": "RED-2",
                      "status": "DRY_RUN",
                      "issues": [],
                      "nameCheck": "UNCHECKED",
                      "screening": "CLEAR",
                      "payoutReference": "VPB0A1B2C3D4E5FR0002",
                      "providerRef": null,
                      "message": "Test batch: simulated, no money was sent",
                      "paidAt": null,
                      "returnedAt": null
                    }
                  ],
                  "test": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/v1/bills": {
      "post": {
        "operationId": "createBill",
        "tags": [
          "Collection"
        ],
        "summary": "Issue a bill",
        "description": "The payer pays it on the hosted pay page from a Sri Lankan bank account. Amounts are JSON numbers in major units. Not idempotent. **With a test key the bill is a test record** (`test: true`): nobody is texted (see `smsDelivery`), no bank account can be linked or debited, and its pay page offers a simulated payment only, which settles it with `settledVia: \"TEST\"` and sends `bill.paid` with `test: true`. To pay it without a browser: `POST /v1/public/bills/{payToken}/test-pay`, no key; it answers 404 for a live bill.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBillRequest"
              },
              "example": {
                "description": "Advisory fee, October",
                "amount": 15000,
                "dueDate": "2026-11-01",
                "payerNic": "199000000000",
                "payerName": "Sample Payer",
                "payerPhone": "0770000000",
                "channels": [
                  "sms"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The bill.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payLink": "/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payerNic": "199000000000",
                  "payerName": "Sample Payer",
                  "payerEmail": null,
                  "payerPhone": "0770000000",
                  "hasAttachment": false,
                  "attachmentName": null,
                  "billerName": "Example Wealth (Pvt) Ltd",
                  "description": "Advisory fee, October",
                  "amount": 15000,
                  "currency": "LKR",
                  "issuedAt": "2026-10-10T08:00:00.000Z",
                  "dueDate": "2026-11-01T00:00:00.000Z",
                  "status": "UNPAID",
                  "overdue": false,
                  "paidAt": null,
                  "paidAmount": null,
                  "paymentRef": null,
                  "settledVia": null,
                  "remindersSent": 0,
                  "lastReminderAt": null,
                  "proofStatus": null,
                  "proofRef": null,
                  "proofAmount": null,
                  "proofAt": null,
                  "proofNote": null,
                  "hasProofSlip": false,
                  "subscriptionId": null,
                  "proofName": null,
                  "scheduledFor": null,
                  "scheduled": false,
                  "allowInstallments": false,
                  "installmentOptions": [],
                  "installmentOf": null,
                  "installmentNo": null,
                  "installmentCount": null,
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "smsDelivery": {
                    "sent": true,
                    "destination": "*******000"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      },
      "get": {
        "operationId": "listBills",
        "tags": [
          "Collection"
        ],
        "summary": "List bills",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/BillStatus"
            }
          },
          {
            "name": "payerNic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "An exact payer NIC or part of an OCR reference.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Defaults to created.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "paid"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1-based. Defaults to 1.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Defaults to 20.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of bills.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillPage"
                },
                "example": {
                  "items": [
                    {
                      "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                      "ocr": "100000000018",
                      "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                      "payLink": "/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                      "payerNic": "199000000000",
                      "payerName": "Sample Payer",
                      "payerEmail": null,
                      "payerPhone": "0770000000",
                      "hasAttachment": false,
                      "attachmentName": null,
                      "billerName": "Example Wealth (Pvt) Ltd",
                      "description": "Advisory fee, October",
                      "amount": 15000,
                      "currency": "LKR",
                      "issuedAt": "2026-10-10T08:00:00.000Z",
                      "dueDate": "2026-11-01T00:00:00.000Z",
                      "status": "UNPAID",
                      "overdue": false,
                      "paidAt": null,
                      "paidAmount": null,
                      "paymentRef": null,
                      "settledVia": null,
                      "remindersSent": 0,
                      "lastReminderAt": null,
                      "proofStatus": null,
                      "proofRef": null,
                      "proofAmount": null,
                      "proofAt": null,
                      "proofNote": null,
                      "hasProofSlip": false,
                      "subscriptionId": null,
                      "proofName": null,
                      "scheduledFor": null,
                      "scheduled": false,
                      "allowInstallments": false,
                      "installmentOptions": [],
                      "installmentOf": null,
                      "installmentNo": null,
                      "installmentCount": null,
                      "createdAt": "2026-10-10T08:00:00.000Z"
                    }
                  ],
                  "total": 1,
                  "page": 1,
                  "pageSize": 20
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/bills/{id}": {
      "get": {
        "operationId": "getBill",
        "tags": [
          "Collection"
        ],
        "summary": "Read one bill",
        "description": "Also reads the bill behind a payment link, whose id is the same.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The bill id, or a payment link's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The bill.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payLink": "/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payerNic": "199000000000",
                  "payerName": "Sample Payer",
                  "payerEmail": null,
                  "payerPhone": "0770000000",
                  "hasAttachment": false,
                  "attachmentName": null,
                  "billerName": "Example Wealth (Pvt) Ltd",
                  "description": "Advisory fee, October",
                  "amount": 15000,
                  "currency": "LKR",
                  "issuedAt": "2026-10-10T08:00:00.000Z",
                  "dueDate": "2026-11-01T00:00:00.000Z",
                  "status": "UNPAID",
                  "overdue": false,
                  "paidAt": null,
                  "paidAmount": null,
                  "paymentRef": null,
                  "settledVia": null,
                  "remindersSent": 0,
                  "lastReminderAt": null,
                  "proofStatus": null,
                  "proofRef": null,
                  "proofAmount": null,
                  "proofAt": null,
                  "proofNote": null,
                  "hasProofSlip": false,
                  "subscriptionId": null,
                  "proofName": null,
                  "scheduledFor": null,
                  "scheduled": false,
                  "allowInstallments": false,
                  "installmentOptions": [],
                  "installmentOf": null,
                  "installmentNo": null,
                  "installmentCount": null,
                  "createdAt": "2026-10-10T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/v1/bills/{id}/cancel": {
      "post": {
        "operationId": "cancelBill",
        "tags": [
          "Collection"
        ],
        "summary": "Cancel a bill",
        "description": "A paid bill cannot be cancelled.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The bill id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The cancelled bill.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payLink": "/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "payerNic": "199000000000",
                  "payerName": "Sample Payer",
                  "payerEmail": null,
                  "payerPhone": "0770000000",
                  "hasAttachment": false,
                  "attachmentName": null,
                  "billerName": "Example Wealth (Pvt) Ltd",
                  "description": "Advisory fee, October",
                  "amount": 15000,
                  "currency": "LKR",
                  "issuedAt": "2026-10-10T08:00:00.000Z",
                  "dueDate": "2026-11-01T00:00:00.000Z",
                  "status": "CANCELLED",
                  "overdue": false,
                  "paidAt": null,
                  "paidAmount": null,
                  "paymentRef": null,
                  "settledVia": null,
                  "remindersSent": 0,
                  "lastReminderAt": null,
                  "proofStatus": null,
                  "proofRef": null,
                  "proofAmount": null,
                  "proofAt": null,
                  "proofNote": null,
                  "hasProofSlip": false,
                  "subscriptionId": null,
                  "proofName": null,
                  "scheduledFor": null,
                  "scheduled": false,
                  "allowInstallments": false,
                  "installmentOptions": [],
                  "installmentOf": null,
                  "installmentNo": null,
                  "installmentCount": null,
                  "createdAt": "2026-10-10T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/v1/payment-links": {
      "post": {
        "operationId": "createPaymentLink",
        "tags": [
          "Collection"
        ],
        "summary": "Create a payment link",
        "description": "A link is a bill with no payer named. Send the customer `url`. Not idempotent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentLinkRequest"
              },
              "example": {
                "description": "Portfolio top-up",
                "amount": 25000,
                "customerName": "Sample Payer",
                "customerPhone": "0770000000",
                "expiresInDays": 7
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "url": "https://pay.anybanq.lk/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "description": "Portfolio top-up",
                  "amount": 25000,
                  "currency": "LKR",
                  "status": "unpaid",
                  "customerName": "Sample Payer",
                  "customerPhone": "0770000000",
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "expiresAt": "2026-10-17T08:00:00.000Z",
                  "paidAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      },
      "get": {
        "operationId": "listPaymentLinks",
        "tags": [
          "Collection"
        ],
        "summary": "List payment links",
        "description": "There is no route for a single link; read one with GET /v1/bills/{id}.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unpaid",
                "paid",
                "expired",
                "cancelled"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1-based. Defaults to 1.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Defaults to 20.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of links.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLinkPage"
                },
                "example": {
                  "items": [
                    {
                      "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                      "ocr": "100000000018",
                      "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                      "url": "https://pay.anybanq.lk/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                      "description": "Portfolio top-up",
                      "amount": 25000,
                      "currency": "LKR",
                      "status": "unpaid",
                      "customerName": "Sample Payer",
                      "customerPhone": "0770000000",
                      "createdAt": "2026-10-10T08:00:00.000Z",
                      "expiresAt": "2026-10-17T08:00:00.000Z",
                      "paidAt": null
                    }
                  ],
                  "total": 1,
                  "page": 1,
                  "pageSize": 20
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/payment-links/{id}/cancel": {
      "post": {
        "operationId": "cancelPaymentLink",
        "tags": [
          "Collection"
        ],
        "summary": "Take a link out of circulation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The link id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The cancelled link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payToken": "EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "url": "https://pay.anybanq.lk/pay/EXAMPLE_PAY_TOKEN_not_a_real_one",
                  "description": "Portfolio top-up",
                  "amount": 25000,
                  "currency": "LKR",
                  "status": "cancelled",
                  "customerName": "Sample Payer",
                  "customerPhone": "0770000000",
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "expiresAt": "2026-10-17T08:00:00.000Z",
                  "paidAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/v1/payment-links/button": {
      "post": {
        "operationId": "createPayButtonCode",
        "tags": [
          "Collection"
        ],
        "summary": "Sign a product into a pay-button code",
        "description": "Nothing is stored. The code is safe to publish: the price is signed into it, so a page cannot change what it charges.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayButtonProductRequest"
              },
              "example": {
                "description": "Portfolio top-up",
                "amount": 25000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayButtonCode"
                },
                "example": {
                  "code": "EXAMPLE_PAY_BUTTON_CODE.not_a_real_signature",
                  "product": {
                    "v": 1,
                    "o": "00000000-0000-4000-8000-000000000000",
                    "a": 25000,
                    "c": "LKR",
                    "d": "Portfolio top-up",
                    "x": 30
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          }
        }
      }
    },
    "/v1/workflows/{id}/sessions": {
      "post": {
        "operationId": "createVerificationSession",
        "tags": [
          "Verification"
        ],
        "summary": "Start a hosted verification for one person",
        "description": "The workflow must be PUBLISHED. Give the browser `token`, or send the person to `hostedUrl`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The workflow id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSessionRequest"
              },
              "example": {
                "subjectRef": "customer-42",
                "ttlHours": 2
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationSession"
                },
                "example": {
                  "id": "d0e1f2a3-b4c5-4d6e-8f7a-8b9c0d1e2f3a",
                  "token": "vs_EXAMPLE_not_a_real_session_token",
                  "status": "PENDING",
                  "subjectRef": "customer-42",
                  "runId": null,
                  "reusable": false,
                  "expiresAt": "2026-10-10T10:00:00.000Z",
                  "createdAt": "2026-10-10T08:00:00.000Z",
                  "hostedUrl": "https://verifia.anybanq.lk/s/vs_EXAMPLE_not_a_real_session_token",
                  "embedUrl": "https://verifia.anybanq.lk/embed/vs_EXAMPLE_not_a_real_session_token",
                  "embedSnippet": "<iframe src=\"https://verifia.anybanq.lk/embed/vs_EXAMPLE_not_a_real_session_token\" width=\"420\" height=\"640\" style=\"border:0\" allow=\"camera\"></iframe>",
                  "sdkSnippet": "<script src=\"https://verifia.anybanq.lk/sdk/v1/verifia.js\"></script>\n<script>\n  Verifia.open({ … });\n</script>"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      },
      "get": {
        "operationId": "listVerificationSessions",
        "tags": [
          "Verification"
        ],
        "summary": "List the latest 50 sessions of a workflow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The workflow id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VerificationSession"
                  }
                },
                "example": [
                  {
                    "id": "d0e1f2a3-b4c5-4d6e-8f7a-8b9c0d1e2f3a",
                    "token": "vs_EXAMPLE_not_a_real_session_token",
                    "status": "PENDING",
                    "subjectRef": "customer-42",
                    "runId": null,
                    "reusable": false,
                    "expiresAt": "2026-10-10T10:00:00.000Z",
                    "createdAt": "2026-10-10T08:00:00.000Z",
                    "hostedUrl": "https://verifia.anybanq.lk/s/vs_EXAMPLE_not_a_real_session_token",
                    "embedUrl": "https://verifia.anybanq.lk/embed/vs_EXAMPLE_not_a_real_session_token",
                    "embedSnippet": "<iframe src=\"https://verifia.anybanq.lk/embed/vs_EXAMPLE_not_a_real_session_token\" width=\"420\" height=\"640\" style=\"border:0\" allow=\"camera\"></iframe>",
                    "sdkSnippet": "<script src=\"https://verifia.anybanq.lk/sdk/v1/verifia.js\"></script>\n<script>\n  Verifia.open({ … });\n</script>"
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    }
  },
  "webhooks": {
    "remittance.order.created": {
      "post": {
        "operationId": "on_remittance_order_created",
        "tags": [
          "Webhooks"
        ],
        "summary": "An order was made.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.created"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.created",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "AWAITING_PAYMENT",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.in_review": {
      "post": {
        "operationId": "on_remittance_order_in_review",
        "tags": [
          "Webhooks"
        ],
        "summary": "Screening held the order for a person to decide.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.in_review"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.in_review",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "IN_REVIEW",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.awaiting_payment": {
      "post": {
        "operationId": "on_remittance_order_awaiting_payment",
        "tags": [
          "Webhooks"
        ],
        "summary": "A held order was released and can be paid.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.awaiting_payment"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.awaiting_payment",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "AWAITING_PAYMENT",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.paying": {
      "post": {
        "operationId": "on_remittance_order_paying",
        "tags": [
          "Webhooks"
        ],
        "summary": "The sender is on the card page.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.paying"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.paying",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "PAYING",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.collected": {
      "post": {
        "operationId": "on_remittance_order_collected",
        "tags": [
          "Webhooks"
        ],
        "summary": "The bank authorised the card payment.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.collected"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.collected",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "COLLECTED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": "AFTER_SETTLEMENT",
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.settled": {
      "post": {
        "operationId": "on_remittance_order_settled",
        "tags": [
          "Webhooks"
        ],
        "summary": "The bank's settlement file shows the sender's money arrived.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.settled"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.settled",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "SETTLED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": "AFTER_SETTLEMENT",
                  "settledAt": "2026-10-10T08:00:00.000Z",
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.payout_instructed": {
      "post": {
        "operationId": "on_remittance_order_payout_instructed",
        "tags": [
          "Webhooks"
        ],
        "summary": "The instruction to pay the recipient was made.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.payout_instructed"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.payout_instructed",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "PAYOUT_INSTRUCTED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": "AFTER_SETTLEMENT",
                  "settledAt": "2026-10-10T08:00:00.000Z",
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.completed": {
      "post": {
        "operationId": "on_remittance_order_completed",
        "tags": [
          "Webhooks"
        ],
        "summary": "Final. Read payoutStatus: DRY_RUN means no bank was instructed.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.completed"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.completed",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "COMPLETED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": "DRY_RUN",
                  "payoutRule": "AFTER_SETTLEMENT",
                  "settledAt": "2026-10-10T08:00:00.000Z",
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.failed": {
      "post": {
        "operationId": "on_remittance_order_failed",
        "tags": [
          "Webhooks"
        ],
        "summary": "Final. failureReason says why.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.failed"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.failed",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "FAILED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": "COLLECTION_DECLINED",
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.expired": {
      "post": {
        "operationId": "on_remittance_order_expired",
        "tags": [
          "Webhooks"
        ],
        "summary": "Final. The quoted rate lapsed before the order was paid.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.expired"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.expired",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "EXPIRED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "remittance.order.cancelled": {
      "post": {
        "operationId": "on_remittance_order_cancelled",
        "tags": [
          "Webhooks"
        ],
        "summary": "Final. Cancelled, or a held order was rejected.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "remittance.order.cancelled"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/RemittanceOrderEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "remittance.order.cancelled",
                "data": {
                  "orderId": "3f2b8c1e-5d44-4a7e-9a36-0b1c2d3e4f50",
                  "externalRef": "transfer-1001",
                  "status": "CANCELLED",
                  "sandbox": true,
                  "send": {
                    "amountMinor": "10000",
                    "currency": "USD"
                  },
                  "receive": {
                    "amountMinor": "2987500",
                    "currency": "LKR"
                  },
                  "payoutStatus": null,
                  "payoutRule": null,
                  "settledAt": null,
                  "failureReason": null,
                  "occurredAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.created": {
      "post": {
        "operationId": "on_payout_batch_created",
        "tags": [
          "Webhooks"
        ],
        "summary": "A batch was created.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.created"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchCreatedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.created",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "rows": 2,
                  "validRows": 2,
                  "invalidRows": 0,
                  "total": 205000,
                  "currency": "LKR"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.approved": {
      "post": {
        "operationId": "on_payout_batch_approved",
        "tags": [
          "Webhooks"
        ],
        "summary": "A second person approved the batch.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.approved"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchApprovedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.approved",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.rejected": {
      "post": {
        "operationId": "on_payout_batch_rejected",
        "tags": [
          "Webhooks"
        ],
        "summary": "The batch was rejected.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.rejected"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchRejectedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.rejected",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "reason": "Two rows are for last month"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.cancelled": {
      "post": {
        "operationId": "on_payout_batch_cancelled",
        "tags": [
          "Webhooks"
        ],
        "summary": "The batch was withdrawn.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.cancelled"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchCancelledEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.cancelled",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "wasFunded": false
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.funded": {
      "post": {
        "operationId": "on_payout_batch_funded",
        "tags": [
          "Webhooks"
        ],
        "summary": "The bank confirmed the funds.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.funded"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchFundedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.funded",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "amountLkr": 205000
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.completed": {
      "post": {
        "operationId": "on_payout_batch_completed",
        "tags": [
          "Webhooks"
        ],
        "summary": "No row is left pending.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.completed"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchCompletedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.completed",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "fundingReference": "VPB0A1B2C3D4E5F",
                  "status": "DRY_RUN",
                  "paid": 0,
                  "failed": 0,
                  "returned": 0,
                  "notSent": 2,
                  "paidAmountLkr": 0
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "payout_batch.row.returned": {
      "post": {
        "operationId": "on_payout_batch_row_returned",
        "tags": [
          "Webhooks"
        ],
        "summary": "The bank sent a paid row back.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "payout_batch.row.returned"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutBatchRowReturnedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "payout_batch.row.returned",
                "data": {
                  "batchId": "b4c9d7e2-1a3f-4b6c-8d9e-0f1a2b3c4d5e",
                  "rowNumber": 1,
                  "payoutReference": "VPB0A1B2C3D4E5FR0001",
                  "amountLkr": 85000,
                  "reason": "Account closed"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "bill.created": {
      "post": {
        "operationId": "on_bill_created",
        "tags": [
          "Webhooks"
        ],
        "summary": "A bill or a payment link was created.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "bill.created"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/BillCreatedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "bill.created",
                "data": {
                  "billId": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payerNic": null,
                  "amount": 25000,
                  "currency": "LKR",
                  "dueDate": "2026-10-17T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "bill.paid": {
      "post": {
        "operationId": "on_bill_paid",
        "tags": [
          "Webhooks"
        ],
        "summary": "A bill or a payment link was paid.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "bill.paid"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/BillPaidEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "bill.paid",
                "data": {
                  "billId": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
                  "ocr": "100000000018",
                  "payerNic": null,
                  "amount": 25000,
                  "currency": "LKR",
                  "settledVia": "HNB_JUSTPAY",
                  "paymentRef": "EXAMPLE-REF-0001",
                  "paidAt": "2026-10-10T08:00:00.000Z"
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    },
    "verification.completed": {
      "post": {
        "operationId": "on_verification_completed",
        "tags": [
          "Webhooks"
        ],
        "summary": "One check inside a workflow finished. Sent once per check.",
        "description": "Sent to each of your webhook endpoints that lists this event. Check the signature against the raw body before acting.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookSignature"
          },
          {
            "$ref": "#/components/parameters/WebhookEvent"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          },
          {
            "$ref": "#/components/parameters/WebhookAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "verification.completed"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/VerificationCompletedEvent"
                  },
                  "sentAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "event",
                  "data",
                  "sentAt"
                ]
              },
              "example": {
                "event": "verification.completed",
                "data": {
                  "verificationId": "a9b8c7d6-e5f4-4a3b-8c2d-1e0f9a8b7c6d",
                  "type": "NIC",
                  "status": "APPROVED",
                  "outcome": "PASS",
                  "score": 100
                },
                "sentAt": "2026-10-10T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within five seconds counts as delivered. Anything else is retried: 10 s, 30 s, 2 min, 10 min, 30 min."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key that starts divp_test_ or divp_live_. Server only."
      }
    },
    "parameters": {
      "WebhookSignature": {
        "name": "x-divp-signature",
        "in": "header",
        "required": true,
        "description": "`sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's secret (`whsec_…`). Nothing but the body is signed; there is no timestamp header. `sentAt` inside the body is the moment the event was queued and is the same on every retry.",
        "schema": {
          "type": "string",
          "pattern": "^sha256=[0-9a-f]{64}$"
        },
        "example": "sha256=5f2d0c1b9a8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4"
      },
      "WebhookEvent": {
        "name": "x-divp-event",
        "in": "header",
        "required": true,
        "description": "The event name.",
        "schema": {
          "type": "string"
        }
      },
      "WebhookDeliveryId": {
        "name": "x-divp-delivery-id",
        "in": "header",
        "required": true,
        "description": "The same on every retry of one delivery. Store it and skip a delivery you have already handled.",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "0f2c6f0e-8a52-4a0e-9d3c-5a4b3c2d1e0f"
      },
      "WebhookAttempt": {
        "name": "x-divp-attempt",
        "in": "header",
        "required": true,
        "description": "1 for the first try.",
        "schema": {
          "type": "string"
        },
        "example": "1"
      }
    },
    "responses": {
      "Error400": {
        "description": "The request was refused: a field failed validation or a rule was broken.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 400,
              "message": [
                "sourceCurrency must be a 3-letter ISO code"
              ],
              "error": "Bad Request"
            }
          }
        }
      },
      "Error401": {
        "description": "The API key is missing, wrong, revoked or expired.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 401,
              "message": "Invalid API key",
              "error": "Unauthorized"
            }
          }
        }
      },
      "Error403": {
        "description": "The key lacks the scope, the service is not enabled for your organisation, or the address is not on your IP whitelist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 403,
              "message": "The Remittance orders service is not enabled for your account",
              "error": "Forbidden"
            }
          }
        }
      },
      "Error404": {
        "description": "No such record in your organisation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 404,
              "message": "Order not found",
              "error": "Not Found"
            }
          }
        }
      },
      "Error409": {
        "description": "The request conflicts with the record's current state.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 409,
              "message": "externalRef was already used for a different order",
              "error": "Conflict"
            }
          }
        }
      },
      "Error429": {
        "description": "Too many requests.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 429,
              "message": "ThrottlerException: Too Many Requests"
            }
          }
        }
      },
      "Error503": {
        "description": "The service cannot take this request right now.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 503,
              "message": "No collection rail is available for remittance orders",
              "error": "Service Unavailable"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer"
          },
          "message": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "A sentence, or a list of sentences when several fields failed validation."
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "statusCode",
          "message"
        ]
      },
      "Money": {
        "type": "object",
        "properties": {
          "amountMinor": {
            "type": "string",
            "pattern": "^\\d{1,18}$",
            "description": "Whole minor units (cents) as a string of digits."
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency"
        ],
        "description": "An amount in minor units with its currency. Never a float."
      },
      "IndicativeAmount": {
        "type": "object",
        "properties": {
          "amountMinor": {
            "type": "string",
            "pattern": "^\\d{1,18}$",
            "description": "Whole minor units (cents) as a string of digits."
          },
          "currency": {
            "type": "string"
          },
          "estimate": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "estimate"
        ],
        "description": "The total in the sender's own card currency. An estimate to show; never what is charged."
      },
      "PayoutTiming": {
        "type": "string",
        "enum": [
          "AFTER_SETTLEMENT",
          "ON_COLLECTION"
        ],
        "description": "AFTER_SETTLEMENT: the recipient is paid once the bank has settled the card payment. ON_COLLECTION: as soon as the bank authorises it."
      },
      "RemittanceOrderStatus": {
        "type": "string",
        "enum": [
          "IN_REVIEW",
          "AWAITING_PAYMENT",
          "PAYING",
          "COLLECTED",
          "SETTLED",
          "PAYOUT_INSTRUCTED",
          "COMPLETED",
          "FAILED",
          "EXPIRED",
          "CANCELLED"
        ]
      },
      "CreateQuoteRequest": {
        "type": "object",
        "properties": {
          "sourceCurrency": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$",
            "description": "The currency the card is charged in. It must be your organisation's charge currency (USD unless changed in the console); any other is refused with 400."
          },
          "displayCurrency": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$",
            "description": "The sender's own card currency, if it is not the charge currency. The quote then carries `indicative`."
          },
          "sendAmountMinor": {
            "type": "string",
            "pattern": "^\\d{1,18}$",
            "description": "Minor units of sourceCurrency. Give this or receiveAmountMinor, not both."
          },
          "receiveAmountMinor": {
            "type": "string",
            "pattern": "^\\d{1,18}$",
            "description": "LKR cents the recipient should get. Give this or sendAmountMinor."
          }
        },
        "required": [
          "sourceCurrency"
        ],
        "additionalProperties": false
      },
      "RemittanceQuote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fixedSide": {
            "type": "string",
            "enum": [
              "SEND",
              "RECEIVE"
            ]
          },
          "send": {
            "$ref": "#/components/schemas/Money"
          },
          "fee": {
            "$ref": "#/components/schemas/Money"
          },
          "total": {
            "$ref": "#/components/schemas/Money"
          },
          "receive": {
            "$ref": "#/components/schemas/Money"
          },
          "rate": {
            "type": "string",
            "description": "LKR per unit of the source currency, after margin, as a decimal string."
          },
          "midRate": {
            "type": "string"
          },
          "marginBps": {
            "type": "integer"
          },
          "feeBps": {
            "type": "integer"
          },
          "feeFixedMinor": {
            "type": "string",
            "pattern": "^\\d{1,18}$",
            "description": "Whole minor units (cents) as a string of digits."
          },
          "rateSource": {
            "type": "string"
          },
          "rateDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "rateExpiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The quote can be turned into an order until this moment."
          },
          "chargeCurrency": {
            "type": "string"
          },
          "indicative": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndicativeAmount"
              },
              {
                "type": "null"
              }
            ]
          },
          "payoutTiming": {
            "$ref": "#/components/schemas/PayoutTiming"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "fixedSide",
          "send",
          "fee",
          "total",
          "receive",
          "rate",
          "midRate",
          "marginBps",
          "feeBps",
          "feeFixedMinor",
          "rateSource",
          "rateDate",
          "rateExpiresAt",
          "chargeCurrency",
          "indicative",
          "payoutTiming",
          "createdAt"
        ]
      },
      "OrderPayee": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "HANDLE",
              "FUND"
            ],
            "description": "ACCOUNT: send bankCode, accountNumber and name. HANDLE: send handle only. FUND: your organisation's own fund account; send nothing else."
          },
          "bankCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10,
            "description": "LankaPay bank code. ACCOUNT only."
          },
          "accountNumber": {
            "type": "string",
            "pattern": "^[0-9]{5,20}$",
            "description": "ACCOUNT only."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "ACCOUNT only."
          },
          "handle": {
            "type": "string",
            "minLength": 4,
            "maxLength": 20,
            "description": "HANDLE only."
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": false
      },
      "OrderSender": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$"
          },
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200
          },
          "phone": {
            "type": "string",
            "minLength": 5,
            "maxLength": 20
          },
          "dob": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "YYYY-MM-DD."
          },
          "nationality": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "quoteId": {
            "type": "string",
            "format": "uuid"
          },
          "externalRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Your own id for this transfer. A repeat create with it returns the same order."
          },
          "payee": {
            "$ref": "#/components/schemas/OrderPayee"
          },
          "sender": {
            "$ref": "#/components/schemas/OrderSender"
          },
          "verificationSessionId": {
            "type": "string",
            "format": "uuid",
            "description": "A completed verification session of yours for this sender."
          }
        },
        "required": [
          "quoteId",
          "externalRef",
          "payee",
          "sender"
        ],
        "additionalProperties": false
      },
      "RemittanceOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalRef": {
            "type": "string"
          },
          "quoteId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/RemittanceOrderStatus"
          },
          "sandbox": {
            "type": "boolean",
            "description": "True when the order is on the mock collection rail: no money exists behind it."
          },
          "send": {
            "$ref": "#/components/schemas/Money"
          },
          "fee": {
            "$ref": "#/components/schemas/Money"
          },
          "total": {
            "$ref": "#/components/schemas/Money"
          },
          "receive": {
            "$ref": "#/components/schemas/Money"
          },
          "rate": {
            "type": "string"
          },
          "rateExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "indicative": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndicativeAmount"
              },
              {
                "type": "null"
              }
            ]
          },
          "payee": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "ACCOUNT",
                  "HANDLE",
                  "FUND"
                ]
              },
              "displayName": {
                "type": "string"
              },
              "bankName": {
                "type": "string"
              },
              "accountMasked": {
                "type": "string",
                "description": "Last four digits only. The full account number is never returned."
              },
              "bankCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "handle": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind",
              "displayName",
              "bankCode",
              "handle"
            ]
          },
          "sender": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "verificationSessionId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            },
            "required": [
              "name",
              "country",
              "verificationSessionId"
            ]
          },
          "screening": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "reviewDecision": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reviewedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "status",
              "reviewDecision",
              "reviewedAt"
            ]
          },
          "collection": {
            "type": "object",
            "properties": {
              "rail": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "redirect"
                ]
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "rail",
              "mode",
              "reference"
            ]
          },
          "payout": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "DRY_RUN, SETTLED or FAILED once a payout has been instructed."
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "providerRef": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timing": {
                "$ref": "#/components/schemas/PayoutTiming"
              },
              "awaitingSettlement": {
                "type": "boolean",
                "description": "True while the recipient has been paid and the bank has not settled the card payment."
              }
            },
            "required": [
              "status",
              "reference",
              "providerRef",
              "message",
              "timing",
              "awaitingSettlement"
            ]
          },
          "settlement": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "NOT_DUE",
                  "AWAITING",
                  "SETTLED"
                ]
              },
              "settledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "amount": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "importId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "state",
              "settledAt",
              "amount",
              "reference",
              "importId"
            ]
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "payingAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "collectedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "settledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payoutInstructedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkoutToken": {
            "type": "string",
            "description": "The token to hand the browser. Present on create and on a single get; left out of lists and of a cancel."
          },
          "checkoutUrl": {
            "type": "string",
            "description": "The hosted checkout page, for a redirect instead of the modal."
          }
        },
        "required": [
          "id",
          "externalRef",
          "quoteId",
          "status",
          "sandbox",
          "send",
          "fee",
          "total",
          "receive",
          "rate",
          "rateExpiresAt",
          "indicative",
          "payee",
          "sender",
          "screening",
          "collection",
          "payout",
          "settlement",
          "failureReason",
          "createdAt",
          "payingAt",
          "collectedAt",
          "settledAt",
          "payoutInstructedAt",
          "completedAt",
          "failedAt",
          "expiredAt",
          "cancelledAt"
        ]
      },
      "RemittanceOrderPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemittanceOrder"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ]
      },
      "PayoutRow": {
        "type": "object",
        "properties": {
          "payeeName": {
            "type": "string",
            "maxLength": 200
          },
          "bankCode": {
            "type": "string",
            "maxLength": 120,
            "description": "LankaPay bank code, e.g. 7010."
          },
          "accountNumber": {
            "type": "string",
            "maxLength": 40
          },
          "amount": {
            "type": "string",
            "maxLength": 20,
            "description": "Major units as a decimal string, as written: \"85000.00\"."
          },
          "reference": {
            "type": "string",
            "maxLength": 120,
            "description": "Shown on the payee's statement. Over 35 characters makes the row INVALID."
          }
        },
        "required": [],
        "additionalProperties": false,
        "description": "Loose on purpose: a missing or bad value makes that row INVALID with its reasons; it does not fail the request."
      },
      "CreatePayoutBatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "amountMode": {
            "type": "string",
            "enum": [
              "LKR",
              "PAYER_CURRENCY"
            ]
          },
          "payerCurrency": {
            "type": "string",
            "pattern": "^[A-Za-z]{3}$",
            "description": "Required when amountMode is PAYER_CURRENCY."
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutRow"
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "required": [
          "rows"
        ],
        "additionalProperties": false
      },
      "PayoutBatchStatus": {
        "type": "string",
        "enum": [
          "AWAITING_APPROVAL",
          "APPROVED",
          "REJECTED",
          "CANCELLED",
          "PROCESSING",
          "PAID",
          "PARTIALLY_PAID",
          "FAILED",
          "DRY_RUN"
        ]
      },
      "PayoutBatchSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PayoutBatchStatus"
          },
          "amountMode": {
            "type": "string",
            "enum": [
              "LKR",
              "PAYER_CURRENCY"
            ]
          },
          "currency": {
            "type": "string"
          },
          "payerCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "fundingReference": {
            "type": "string",
            "description": "Quote this on the bank transfer that funds the batch."
          },
          "rowCount": {
            "type": "integer"
          },
          "validCount": {
            "type": "integer"
          },
          "invalidCount": {
            "type": "integer"
          },
          "totalAmount": {
            "type": "number",
            "description": "Major units."
          },
          "totalAmountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "quote": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "number"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rateDate": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "indicativeAmount": {
                    "type": "number"
                  },
                  "indicativeCurrency": {
                    "type": "string"
                  }
                },
                "required": [
                  "currency",
                  "rate",
                  "source",
                  "rateDate",
                  "indicativeAmount",
                  "indicativeCurrency"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Indicative only, from the published rate at upload. Never used to instruct a payment."
          },
          "bankRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fundedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fundedAmountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "executedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "payeeListId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "repeatOfBatchId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "paymentsLive": {
            "type": "boolean",
            "description": "False while real payouts are switched off: sending records a test run and moves nothing. Always false on a test batch."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "amountMode",
          "currency",
          "payerCurrency",
          "fundingReference",
          "rowCount",
          "validCount",
          "invalidCount",
          "totalAmount",
          "totalAmountLkr",
          "quote",
          "bankRate",
          "approvedAt",
          "fundedAt",
          "fundedAmountLkr",
          "executedAt",
          "completedAt",
          "createdById",
          "payeeListId",
          "repeatOfBatchId",
          "paymentsLive",
          "createdAt"
        ]
      },
      "PayoutBatchRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "rowNumber": {
            "type": "integer"
          },
          "payeeName": {
            "type": [
              "string",
              "null"
            ]
          },
          "bankCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "bankName": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "amountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "INVALID",
              "READY",
              "PROCESSING",
              "PAID",
              "FAILED",
              "RETURNED",
              "DRY_RUN"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ]
                }
              },
              "required": [
                "code",
                "message",
                "severity"
              ]
            }
          },
          "nameCheck": {
            "type": "string",
            "enum": [
              "MATCH",
              "CLOSE_MATCH",
              "NO_MATCH",
              "UNCHECKED"
            ]
          },
          "screening": {
            "type": "string",
            "enum": [
              "CLEAR",
              "PEP",
              "HIT",
              "UNAVAILABLE",
              "SKIPPED"
            ]
          },
          "payoutReference": {
            "type": "string"
          },
          "providerRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "returnedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "rowNumber",
          "payeeName",
          "bankCode",
          "bankName",
          "accountNumber",
          "amount",
          "currency",
          "amountLkr",
          "reference",
          "status",
          "issues",
          "nameCheck",
          "screening",
          "payoutReference",
          "providerRef",
          "message",
          "paidAt",
          "returnedAt"
        ]
      },
      "PayoutBatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PayoutBatchStatus"
          },
          "amountMode": {
            "type": "string",
            "enum": [
              "LKR",
              "PAYER_CURRENCY"
            ]
          },
          "currency": {
            "type": "string"
          },
          "payerCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "fundingReference": {
            "type": "string",
            "description": "Quote this on the bank transfer that funds the batch."
          },
          "rowCount": {
            "type": "integer"
          },
          "validCount": {
            "type": "integer"
          },
          "invalidCount": {
            "type": "integer"
          },
          "totalAmount": {
            "type": "number",
            "description": "Major units."
          },
          "totalAmountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "quote": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "number"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rateDate": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "indicativeAmount": {
                    "type": "number"
                  },
                  "indicativeCurrency": {
                    "type": "string"
                  }
                },
                "required": [
                  "currency",
                  "rate",
                  "source",
                  "rateDate",
                  "indicativeAmount",
                  "indicativeCurrency"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Indicative only, from the published rate at upload. Never used to instruct a payment."
          },
          "bankRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fundedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fundedAmountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "executedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "payeeListId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "repeatOfBatchId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "paymentsLive": {
            "type": "boolean",
            "description": "False while real payouts are switched off: sending records a test run and moves nothing. Always false on a test batch."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByApiKey": {
            "type": "boolean"
          },
          "approvedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rejectedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rejectionReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "repeatOf": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "createdAt"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when an earlier live batch had the same payees, accounts and amounts."
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutBatchRow"
            }
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "amountMode",
          "currency",
          "payerCurrency",
          "fundingReference",
          "rowCount",
          "validCount",
          "invalidCount",
          "totalAmount",
          "totalAmountLkr",
          "quote",
          "bankRate",
          "approvedAt",
          "fundedAt",
          "fundedAmountLkr",
          "executedAt",
          "completedAt",
          "createdById",
          "payeeListId",
          "repeatOfBatchId",
          "paymentsLive",
          "createdAt",
          "createdBy",
          "createdByApiKey",
          "approvedBy",
          "rejectedBy",
          "rejectionReason",
          "repeatOf",
          "rows"
        ]
      },
      "CreateBillRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Major units as a JSON number: 1500 is LKR 1,500.00."
          },
          "dueDate": {
            "type": "string",
            "description": "ISO 8601 date or date-time."
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "description": "Defaults to LKR."
          },
          "payerNic": {
            "type": "string",
            "minLength": 9,
            "maxLength": 14
          },
          "payerName": {
            "type": "string",
            "maxLength": 120
          },
          "payerEmail": {
            "type": "string",
            "format": "email"
          },
          "payerPhone": {
            "type": "string",
            "maxLength": 20
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sms",
                "whatsapp",
                "email"
              ]
            },
            "description": "Delivery to attempt on issue. Only sms is sent by the server today."
          },
          "repeat": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "ANNUAL"
            ],
            "description": "Raise the bill again on a cycle. Needs payerNic."
          },
          "allowInstallments": {
            "type": "boolean"
          }
        },
        "required": [
          "description",
          "amount",
          "dueDate"
        ],
        "additionalProperties": false
      },
      "BillStatus": {
        "type": "string",
        "enum": [
          "UNPAID",
          "PAYING",
          "HELD",
          "PAID",
          "OVERDUE",
          "CANCELLED",
          "SPLIT",
          "REFUNDED"
        ]
      },
      "Bill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ocr": {
            "type": "string",
            "description": "The payment reference printed on the bill."
          },
          "payToken": {
            "type": "string",
            "description": "Capability to pay this bill. Treat it like a password for the bill."
          },
          "payLink": {
            "type": "string",
            "description": "Path of the hosted pay page: \"/pay/<payToken>\"."
          },
          "payerNic": {
            "type": [
              "string",
              "null"
            ]
          },
          "payerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "payerEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "payerPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasAttachment": {
            "type": "boolean"
          },
          "attachmentName": {
            "type": [
              "string",
              "null"
            ]
          },
          "billerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/BillStatus"
          },
          "overdue": {
            "type": "boolean"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paidAmount": {
            "type": [
              "number",
              "null"
            ]
          },
          "paymentRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "settledVia": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it was settled, e.g. \"HNB_JUSTPAY\" or \"MANUAL\"."
          },
          "remindersSent": {
            "type": "integer"
          },
          "lastReminderAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "proofStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "proofRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "proofAmount": {
            "type": [
              "number",
              "null"
            ]
          },
          "proofAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "proofNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasProofSlip": {
            "type": "boolean"
          },
          "subscriptionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "proofName": {
            "type": [
              "string",
              "null"
            ]
          },
          "scheduledFor": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scheduled": {
            "type": "boolean"
          },
          "allowInstallments": {
            "type": "boolean"
          },
          "installmentOptions": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "installmentOf": {
            "type": [
              "string",
              "null"
            ]
          },
          "installmentNo": {
            "type": [
              "integer",
              "null"
            ]
          },
          "installmentCount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          },
          "smsDelivery": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "sent": {
                    "type": "boolean"
                  },
                  "suppressed": {
                    "type": "boolean"
                  },
                  "destination": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "sent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "On create only. For a test bill nothing is sent: `sent` is false, `suppressed` is true, and the text is kept under GET /v1/notifications."
          },
          "recurring": {
            "type": "object",
            "description": "On create only, when `repeat` was given."
          }
        },
        "required": [
          "id",
          "ocr",
          "payToken",
          "payLink",
          "payerNic",
          "payerName",
          "payerEmail",
          "payerPhone",
          "hasAttachment",
          "attachmentName",
          "billerName",
          "description",
          "amount",
          "currency",
          "issuedAt",
          "dueDate",
          "status",
          "overdue",
          "paidAt",
          "paidAmount",
          "paymentRef",
          "settledVia",
          "remindersSent",
          "lastReminderAt",
          "proofStatus",
          "proofRef",
          "proofAmount",
          "proofAt",
          "proofNote",
          "hasProofSlip",
          "subscriptionId",
          "proofName",
          "scheduledFor",
          "scheduled",
          "allowInstallments",
          "installmentOptions",
          "installmentOf",
          "installmentNo",
          "installmentCount",
          "createdAt"
        ]
      },
      "BillPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bill"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ]
      },
      "CreatePaymentLinkRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Major units as a JSON number, in LKR."
          },
          "customerName": {
            "type": "string",
            "maxLength": 120
          },
          "customerPhone": {
            "type": "string",
            "maxLength": 20,
            "description": "Given a number, the link is texted to it unless notify is false."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Exact expiry. Takes precedence over expiresInDays."
          },
          "expiresInDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "description": "Defaults to 30."
          },
          "notify": {
            "type": "boolean"
          }
        },
        "required": [
          "description",
          "amount"
        ],
        "additionalProperties": false
      },
      "PaymentLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Also the id of the bill behind the link: GET /v1/bills/{id} reads it."
          },
          "ocr": {
            "type": "string"
          },
          "payToken": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "The full URL to send the customer."
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "unpaid",
              "paid",
              "expired",
              "cancelled"
            ]
          },
          "customerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "id",
          "ocr",
          "payToken",
          "url",
          "description",
          "amount",
          "currency",
          "status",
          "customerName",
          "customerPhone",
          "createdAt",
          "expiresAt",
          "paidAt"
        ]
      },
      "PaymentLinkPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentLink"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ]
      },
      "PayButtonProductRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "description": "Defaults to LKR."
          },
          "expiresInDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          }
        },
        "required": [
          "description",
          "amount"
        ],
        "additionalProperties": false
      },
      "PayButtonCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Publishable. Goes in the page as data-verifia-pay=\"<code>\"."
          },
          "product": {
            "type": "object",
            "properties": {
              "v": {
                "type": "integer"
              },
              "o": {
                "type": "string"
              },
              "a": {
                "type": "number"
              },
              "c": {
                "type": "string"
              },
              "d": {
                "type": "string"
              },
              "x": {
                "type": "integer"
              }
            },
            "required": [
              "v",
              "o",
              "a",
              "c",
              "d",
              "x"
            ]
          }
        },
        "required": [
          "code",
          "product"
        ]
      },
      "CreateSessionRequest": {
        "type": "object",
        "properties": {
          "subjectRef": {
            "type": "string",
            "maxLength": 120,
            "description": "Your own reference for the person being verified."
          },
          "ttlHours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 8760,
            "description": "Defaults to 24."
          },
          "reusable": {
            "type": "boolean",
            "description": "One link many people can each use; every visitor gets a separate run."
          },
          "neverExpires": {
            "type": "boolean",
            "description": "No expiry at all. Overrides ttlHours."
          },
          "recipient": {
            "type": "object",
            "description": "Who the link is for. A name alone is a greeting; a mobile or email lets the link be sent. Not allowed on a reusable link.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120
              },
              "mobile": {
                "type": "string",
                "maxLength": 20,
                "description": "Sri Lankan mobile, e.g. 077 123 4567; stored as +947XXXXXXXX."
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 160
              }
            },
            "additionalProperties": false
          },
          "send": {
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "string",
              "enum": [
                "SMS",
                "EMAIL"
              ]
            },
            "description": "Deliver the hosted link now. Each channel needs the matching recipient field. Links made with a test key are recorded, not sent."
          },
          "message": {
            "type": "string",
            "maxLength": 300,
            "description": "A short note added to the email."
          },
          "prefill": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Values for the workflow's operator-only inputs (for example riskLevel). Never shown to or changeable by the customer."
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "VerificationSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string",
            "description": "The token to hand the browser."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "COMPLETED",
              "EXPIRED"
            ]
          },
          "subjectRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "runId": {
            "type": [
              "string",
              "null"
            ]
          },
          "reusable": {
            "type": "boolean"
          },
          "usageCount": {
            "type": "integer",
            "description": "Reusable links only: how many people have used it."
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "hostedUrl": {
            "type": "string"
          },
          "embedUrl": {
            "type": "string"
          },
          "embedSnippet": {
            "type": "string"
          },
          "sdkSnippet": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "token",
          "status",
          "subjectRef",
          "runId",
          "reusable",
          "expiresAt",
          "createdAt",
          "hostedUrl",
          "embedUrl",
          "embedSnippet",
          "sdkSnippet"
        ]
      },
      "RemittanceOrderEvent": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "externalRef": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RemittanceOrderStatus"
          },
          "sandbox": {
            "type": "boolean"
          },
          "send": {
            "$ref": "#/components/schemas/Money"
          },
          "receive": {
            "$ref": "#/components/schemas/Money"
          },
          "payoutStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "payoutRule": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "AFTER_SETTLEMENT",
              "ON_COLLECTION",
              null
            ],
            "description": "The rule the order was given when the bank authorised it; null before that."
          },
          "settledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "orderId",
          "externalRef",
          "status",
          "sandbox",
          "send",
          "receive",
          "payoutStatus",
          "payoutRule",
          "settledAt",
          "failureReason",
          "occurredAt"
        ]
      },
      "BillPaidEvent": {
        "type": "object",
        "properties": {
          "billId": {
            "type": "string",
            "format": "uuid"
          },
          "ocr": {
            "type": "string"
          },
          "payerNic": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "settledVia": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "billId",
          "ocr",
          "payerNic",
          "amount",
          "currency",
          "settledVia",
          "paymentRef",
          "paidAt"
        ]
      },
      "BillCreatedEvent": {
        "type": "object",
        "properties": {
          "billId": {
            "type": "string",
            "format": "uuid"
          },
          "ocr": {
            "type": "string"
          },
          "payerNic": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "billId",
          "ocr",
          "payerNic",
          "amount",
          "currency",
          "dueDate"
        ]
      },
      "PayoutBatchCreatedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          },
          "rows": {
            "type": "integer"
          },
          "validRows": {
            "type": "integer"
          },
          "invalidRows": {
            "type": "integer"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "batchId",
          "fundingReference",
          "rows",
          "validRows",
          "invalidRows",
          "total",
          "currency"
        ]
      },
      "PayoutBatchApprovedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          }
        },
        "required": [
          "batchId",
          "fundingReference"
        ]
      },
      "PayoutBatchRejectedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "batchId",
          "fundingReference",
          "reason"
        ]
      },
      "PayoutBatchCancelledEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          },
          "wasFunded": {
            "type": "boolean"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "batchId",
          "fundingReference",
          "wasFunded"
        ]
      },
      "PayoutBatchFundedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          },
          "amountLkr": {
            "type": "number"
          }
        },
        "required": [
          "batchId",
          "fundingReference",
          "amountLkr"
        ]
      },
      "PayoutBatchCompletedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "fundingReference": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PayoutBatchStatus"
          },
          "paid": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "returned": {
            "type": "integer"
          },
          "notSent": {
            "type": "integer",
            "description": "Rows recorded as a test run: payouts are switched off, or the batch is a test batch."
          },
          "paidAmountLkr": {
            "type": "number"
          },
          "test": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Present, and true, only on a test record: one made with a divp_test_ key. A test record is sent to nobody, cannot be paid or funded for real, and is never listed or counted with live ones."
          }
        },
        "required": [
          "batchId",
          "fundingReference",
          "status",
          "paid",
          "failed",
          "returned",
          "notSent",
          "paidAmountLkr"
        ]
      },
      "PayoutBatchRowReturnedEvent": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "rowNumber": {
            "type": "integer"
          },
          "payoutReference": {
            "type": "string"
          },
          "amountLkr": {
            "type": [
              "number",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "batchId",
          "rowNumber",
          "payoutReference",
          "amountLkr",
          "reason"
        ]
      },
      "VerificationCompletedEvent": {
        "type": "object",
        "properties": {
          "verificationId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "score": {
            "type": "number"
          }
        },
        "required": [
          "verificationId",
          "type",
          "status",
          "outcome",
          "score"
        ]
      }
    }
  }
}
