{
  "openapi": "3.1.0",
  "info": {
    "title": "Nice Pay merchant API",
    "version": "2026-12-01",
    "description": "Requests are signed with the NP1 scheme (NP-Key-Id, NP-Timestamp, NP-Nonce, NP-Algorithm, NP-Signature). Money is a decimal string."
  },
  "servers": [
    {
      "url": "https://api.mynicepanel.com"
    }
  ],
  "paths": {
    "/v1/ping": {
      "get": {
        "operationId": "ping",
        "summary": "Check credentials",
        "tags": [
          "Utilities"
        ],
        "x-np-scope": null,
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "ping"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "project": {
                      "type": "string"
                    },
                    "merchant": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "payins:write",
                          "payins:read",
                          "payouts:write",
                          "payouts:read",
                          "crypto:write",
                          "crypto:read",
                          "balances:read",
                          "settlements:write",
                          "settlements:read",
                          "events:read",
                          "webhooks:write",
                          "reports:write"
                        ]
                      }
                    },
                    "api_version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "project",
                    "merchant",
                    "scopes",
                    "api_version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payins": {
      "post": {
        "operationId": "createPayin",
        "summary": "Create a pay-in",
        "tags": [
          "Pay-ins"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "merchant_order_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                    "example": "10000.00"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "INR",
                      "USDT"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "upi",
                      "bank_transfer",
                      "usdt_trc20",
                      "usdt_bep20",
                      "auto"
                    ]
                  },
                  "customer": {
                    "type": "object",
                    "properties": {
                      "ref": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+?[0-9]{6,15}$",
                        "description": "Your customer's mobile number, digits with an optional leading `+` (an Indian mobile: 10 digits, `91` + 10 or `+91` + 10). Some channels require it: a payment without it is not routed to them, and another of your routes takes it. Send it whenever you have it. Never returned.",
                        "example": "+919876543210"
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 120,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                        "description": "Your customer's e-mail. Some channels pass one to the bank; without it Nice Pay sends a stand-in formed from `customer.ref`. Never returned.",
                        "example": "player@example.com"
                      },
                      "ip": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "ipv4",
                            "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
                          },
                          {
                            "type": "string",
                            "format": "ipv6",
                            "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
                          }
                        ]
                      }
                    },
                    "required": [
                      "ref"
                    ],
                    "additionalProperties": false
                  },
                  "return_url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "expires_in": {
                    "description": "Seconds the customer has to pay (60–86,400); the checkout's clock counts it down from it. Left out: Nice Pay's default.",
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400
                  },
                  "channel": {
                    "description": "INR only: what may take the pay-in. `desk`: a payment desk's QR or account, shown on the checkout; `gateway`: any gateway channel's payment page; or one channel by its id — `upi` (UPI channel), `qr` (QR channel), `instant` (Instant channel), `qr_lite` (QR Lite), `qr_2` (QR channel 2), `bank` (Bank channel): that channel's QR or payment page is used for the deposit, and the pay-in never moves to another channel. Leave it out and your routing chooses among all. A channel that is not on your routes: `422 method_not_available`. Nothing of the named kind can take it now: `503 rail_unavailable`, exactly as when nothing can. Test mode accepts it and pays on the simulated rail.",
                    "type": "string",
                    "enum": [
                      "desk",
                      "gateway",
                      "upi",
                      "qr",
                      "instant",
                      "qr_lite",
                      "qr_2",
                      "bank"
                    ]
                  },
                  "description": {
                    "description": "Why: the purpose of this payment in your words, e.g. \"player deposit\" (≤ 200 characters). Shown on the payment and in exports.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "metadata": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_]{1,40}$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    }
                  }
                },
                "required": [
                  "merchant_order_id",
                  "amount",
                  "currency",
                  "method",
                  "customer"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payin"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_order_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "amount_received": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "succeeded",
                        "failed",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "late": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20",
                        "auto"
                      ]
                    },
                    "rail": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "redirect",
                            "upi_qr",
                            "bank_details",
                            "crypto_address",
                            "simulated",
                            "none"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {},
                      "description": "How the customer pays. `none` on an imported payment: there is nothing to pay."
                    },
                    "transfers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tx_hash": {
                            "type": "string"
                          },
                          "log_index": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "status": {
                            "type": "string"
                          },
                          "block_time": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "from_address": {
                            "type": "string",
                            "description": "Who paid: the address the transfer came from (four-systems N15)."
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time",
                          "from_address"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "fee": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "net_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "description": "The payment's reference once known: the UTR (or bank reference) for INR, the transaction hash of the first transfer for USDT.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payer": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "INR: who paid, masked (a UPI id or account), when the gateway or desk reports it; null otherwise. USDT: see each transfer's from_address."
                    },
                    "durations": {
                      "description": "On GET /v1/payins/{id}: from the order to the money received.",
                      "type": "object",
                      "properties": {
                        "seconds_to_receive": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_receive"
                      ],
                      "additionalProperties": false
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a payment imported from your platform's old system (its past deposits, for reading). An imported payment never moved money here: no fee, no balance, no event; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported payment; null on every payment made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_order_id",
                    "amount",
                    "amount_received",
                    "currency",
                    "status",
                    "late",
                    "method",
                    "rail",
                    "checkout_url",
                    "instructions",
                    "fee",
                    "net_amount",
                    "reversed_at",
                    "reversed_amount",
                    "customer",
                    "reference",
                    "description",
                    "payer",
                    "expires_at",
                    "created_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listPayins",
        "summary": "List pay-ins",
        "tags": [
          "Pay-ins"
        ],
        "x-np-scope": "payins:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "merchant_order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "succeeded",
                "failed",
                "expired",
                "cancelled"
              ]
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "upi",
                "bank_transfer",
                "usdt_trc20",
                "usdt_bep20",
                "auto"
              ]
            }
          },
          {
            "name": "customer_ref",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Exact: a UTR or bank reference (spaces and case ignored) or a transaction hash.",
              "type": "string",
              "minLength": 6,
              "maxLength": 128
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "INR",
                "USDT"
              ]
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "amount_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
              "example": "10000.00"
            }
          },
          {
            "name": "amount_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
              "example": "10000.00"
            }
          },
          {
            "name": "legacy_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The id the payment had on your previous system, for payments imported into Nice Pay.",
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "imported",
            "in": "query",
            "required": false,
            "schema": {
              "default": "both",
              "description": "Imported history (`true`), payments made at Nice Pay (`false`), or both.",
              "type": "string",
              "enum": [
                "true",
                "false",
                "both"
              ]
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "payin"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "merchant_order_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "amount_received": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "processing",
                              "succeeded",
                              "failed",
                              "expired",
                              "cancelled"
                            ]
                          },
                          "late": {
                            "type": "boolean"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "upi",
                              "bank_transfer",
                              "usdt_trc20",
                              "usdt_bep20",
                              "auto"
                            ]
                          },
                          "rail": {
                            "type": "string"
                          },
                          "checkout_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "instructions": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "redirect",
                                  "upi_qr",
                                  "bank_details",
                                  "crypto_address",
                                  "simulated",
                                  "none"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {},
                            "description": "How the customer pays. `none` on an imported payment: there is nothing to pay."
                          },
                          "transfers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tx_hash": {
                                  "type": "string"
                                },
                                "log_index": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "amount": {
                                  "type": "string",
                                  "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "example": "10000.00"
                                },
                                "status": {
                                  "type": "string"
                                },
                                "block_time": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "from_address": {
                                  "type": "string",
                                  "description": "Who paid: the address the transfer came from (four-systems N15)."
                                }
                              },
                              "required": [
                                "tx_hash",
                                "log_index",
                                "amount",
                                "status",
                                "block_time",
                                "from_address"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "fee": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "net_amount": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_amount": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "ref": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "ref"
                            ],
                            "additionalProperties": false
                          },
                          "reference": {
                            "description": "The payment's reference once known: the UTR (or bank reference) for INR, the transaction hash of the first transfer for USDT.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "payer": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "masked": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "masked"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "INR: who paid, masked (a UPI id or account), when the gateway or desk reports it; null otherwise. USDT: see each transfer's from_address."
                          },
                          "durations": {
                            "description": "On GET /v1/payins/{id}: from the order to the money received.",
                            "type": "object",
                            "properties": {
                              "seconds_to_receive": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "seconds_to_receive"
                            ],
                            "additionalProperties": false
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "imported": {
                            "type": "boolean",
                            "description": "True on a payment imported from your platform's old system (its past deposits, for reading). An imported payment never moved money here: no fee, no balance, no event; write requests on it answer `409 imported_record`."
                          },
                          "legacy_id": {
                            "description": "Your old system's own id of an imported payment; null on every payment made here.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "merchant_order_id",
                          "amount",
                          "amount_received",
                          "currency",
                          "status",
                          "late",
                          "method",
                          "rail",
                          "checkout_url",
                          "instructions",
                          "fee",
                          "net_amount",
                          "reversed_at",
                          "reversed_amount",
                          "customer",
                          "reference",
                          "description",
                          "payer",
                          "expires_at",
                          "created_at",
                          "metadata",
                          "imported",
                          "legacy_id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payins/{id}": {
      "get": {
        "operationId": "getPayin",
        "summary": "Retrieve a pay-in",
        "tags": [
          "Pay-ins"
        ],
        "x-np-scope": "payins:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payin"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_order_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "amount_received": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "succeeded",
                        "failed",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "late": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20",
                        "auto"
                      ]
                    },
                    "rail": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "redirect",
                            "upi_qr",
                            "bank_details",
                            "crypto_address",
                            "simulated",
                            "none"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {},
                      "description": "How the customer pays. `none` on an imported payment: there is nothing to pay."
                    },
                    "transfers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tx_hash": {
                            "type": "string"
                          },
                          "log_index": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "status": {
                            "type": "string"
                          },
                          "block_time": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "from_address": {
                            "type": "string",
                            "description": "Who paid: the address the transfer came from (four-systems N15)."
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time",
                          "from_address"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "fee": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "net_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "description": "The payment's reference once known: the UTR (or bank reference) for INR, the transaction hash of the first transfer for USDT.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payer": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "INR: who paid, masked (a UPI id or account), when the gateway or desk reports it; null otherwise. USDT: see each transfer's from_address."
                    },
                    "durations": {
                      "description": "On GET /v1/payins/{id}: from the order to the money received.",
                      "type": "object",
                      "properties": {
                        "seconds_to_receive": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_receive"
                      ],
                      "additionalProperties": false
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a payment imported from your platform's old system (its past deposits, for reading). An imported payment never moved money here: no fee, no balance, no event; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported payment; null on every payment made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_order_id",
                    "amount",
                    "amount_received",
                    "currency",
                    "status",
                    "late",
                    "method",
                    "rail",
                    "checkout_url",
                    "instructions",
                    "fee",
                    "net_amount",
                    "reversed_at",
                    "reversed_amount",
                    "customer",
                    "reference",
                    "description",
                    "payer",
                    "expires_at",
                    "created_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payins/{id}/cancel": {
      "post": {
        "operationId": "cancelPayin",
        "summary": "Cancel a pending pay-in",
        "tags": [
          "Pay-ins"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payin"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_order_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "amount_received": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "succeeded",
                        "failed",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "late": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20",
                        "auto"
                      ]
                    },
                    "rail": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "redirect",
                            "upi_qr",
                            "bank_details",
                            "crypto_address",
                            "simulated",
                            "none"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {},
                      "description": "How the customer pays. `none` on an imported payment: there is nothing to pay."
                    },
                    "transfers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tx_hash": {
                            "type": "string"
                          },
                          "log_index": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "status": {
                            "type": "string"
                          },
                          "block_time": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "from_address": {
                            "type": "string",
                            "description": "Who paid: the address the transfer came from (four-systems N15)."
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time",
                          "from_address"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "fee": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "net_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "description": "The payment's reference once known: the UTR (or bank reference) for INR, the transaction hash of the first transfer for USDT.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payer": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "INR: who paid, masked (a UPI id or account), when the gateway or desk reports it; null otherwise. USDT: see each transfer's from_address."
                    },
                    "durations": {
                      "description": "On GET /v1/payins/{id}: from the order to the money received.",
                      "type": "object",
                      "properties": {
                        "seconds_to_receive": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_receive"
                      ],
                      "additionalProperties": false
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a payment imported from your platform's old system (its past deposits, for reading). An imported payment never moved money here: no fee, no balance, no event; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported payment; null on every payment made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_order_id",
                    "amount",
                    "amount_received",
                    "currency",
                    "status",
                    "late",
                    "method",
                    "rail",
                    "checkout_url",
                    "instructions",
                    "fee",
                    "net_amount",
                    "reversed_at",
                    "reversed_amount",
                    "customer",
                    "reference",
                    "description",
                    "payer",
                    "expires_at",
                    "created_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payins/{id}/reference": {
      "post": {
        "operationId": "submitPayinReference",
        "summary": "Submit the customer's payment reference (UTR) for a desk pay-in",
        "tags": [
          "Pay-ins"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 64
                  }
                },
                "required": [
                  "reference"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "pi_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payin"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_order_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "amount_received": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "succeeded",
                        "failed",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "late": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20",
                        "auto"
                      ]
                    },
                    "rail": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "redirect",
                            "upi_qr",
                            "bank_details",
                            "crypto_address",
                            "simulated",
                            "none"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {},
                      "description": "How the customer pays. `none` on an imported payment: there is nothing to pay."
                    },
                    "transfers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tx_hash": {
                            "type": "string"
                          },
                          "log_index": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "status": {
                            "type": "string"
                          },
                          "block_time": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "from_address": {
                            "type": "string",
                            "description": "Who paid: the address the transfer came from (four-systems N15)."
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time",
                          "from_address"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "fee": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "net_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversed_amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "description": "The payment's reference once known: the UTR (or bank reference) for INR, the transaction hash of the first transfer for USDT.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payer": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "INR: who paid, masked (a UPI id or account), when the gateway or desk reports it; null otherwise. USDT: see each transfer's from_address."
                    },
                    "durations": {
                      "description": "On GET /v1/payins/{id}: from the order to the money received.",
                      "type": "object",
                      "properties": {
                        "seconds_to_receive": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_receive"
                      ],
                      "additionalProperties": false
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a payment imported from your platform's old system (its past deposits, for reading). An imported payment never moved money here: no fee, no balance, no event; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported payment; null on every payment made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_order_id",
                    "amount",
                    "amount_received",
                    "currency",
                    "status",
                    "late",
                    "method",
                    "rail",
                    "checkout_url",
                    "instructions",
                    "fee",
                    "net_amount",
                    "reversed_at",
                    "reversed_amount",
                    "customer",
                    "reference",
                    "description",
                    "payer",
                    "expires_at",
                    "created_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payins/{id}/checks": {
      "post": {
        "operationId": "createPayinCheck",
        "summary": "Ask Nice Pay to check a pay-in (a thread)",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 1000,
                    "description": "What to check, in your words: what your customer says happened. Plain text."
                  },
                  "reference": {
                    "description": "The reference your customer gave: a UTR, a bank reference or a transaction hash.",
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 64
                  },
                  "proof_upload_ids": {
                    "default": [],
                    "description": "Up to 12 images sent first with POST /v1/uploads (each used once).",
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 40,
                      "example": "upl_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    }
                  }
                },
                "required": [
                  "note"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "chk_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "check"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "payin",
                            "payout"
                          ]
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "answered",
                        "closed"
                      ],
                      "description": "`open`: Nice Pay is checking; `answered`: the desk or gateway answered (`answer`); `closed`: ended — a pay-in found and credited ends in `payin.succeeded`, a payout taken back in `payout.reversed`."
                    },
                    "answer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "confirmed",
                            "denied"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a pay-in: whether the money was found. For a payout: whether the desk confirms it paid."
                    },
                    "credited": {
                      "type": "boolean",
                      "description": "True when the check ended with the pay-in credited."
                    },
                    "waiting_for": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "nice_pay",
                            "merchant"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whose turn it is in the thread; null once closed."
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "close_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "answered_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Nice Pay first answered in the thread."
                    },
                    "closed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "check_message"
                          },
                          "author": {
                            "type": "string",
                            "enum": [
                              "merchant",
                              "nice_pay"
                            ]
                          },
                          "body": {
                            "type": "string"
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content_type": {
                                  "type": "string"
                                },
                                "url": {
                                  "description": "A link to the image for five minutes; fetch the check again for a new one. Null in events.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expires_at": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "content_type",
                                "url",
                                "expires_at"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "author",
                          "body",
                          "files",
                          "created_at"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The thread between you and Nice Pay, oldest first. The first message is your note."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "payment",
                    "status",
                    "answer",
                    "credited",
                    "waiting_for",
                    "reference",
                    "note",
                    "close_reason",
                    "created_at",
                    "answered_at",
                    "closed_at",
                    "messages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payouts": {
      "post": {
        "operationId": "createPayout",
        "summary": "Create a payout",
        "tags": [
          "Payouts"
        ],
        "x-np-scope": "payouts:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "merchant_payout_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                    "example": "10000.00"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "INR",
                      "USDT"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "upi",
                      "bank_transfer",
                      "usdt_trc20",
                      "usdt_bep20"
                    ]
                  },
                  "destination": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "account_number": {
                            "type": "string",
                            "maxLength": 40
                          },
                          "ifsc": {
                            "type": "string",
                            "maxLength": 20
                          },
                          "holder_name": {
                            "type": "string",
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "account_number",
                          "ifsc",
                          "holder_name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "vpa": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "holder_name": {
                            "type": "string",
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "vpa",
                          "holder_name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "required": [
                          "address"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "customer": {
                    "type": "object",
                    "properties": {
                      "ref": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                      },
                      "name": {
                        "description": "Your customer's name (the account holder's name goes in `destination`).",
                        "type": "string",
                        "maxLength": 100
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+?[0-9]{6,15}$",
                        "description": "Your customer's mobile number, digits with an optional leading `+` (an Indian mobile: 10 digits, `91` + 10 or `+91` + 10). Some channels require it: a payment without it is not routed to them, and another of your routes takes it. Send it whenever you have it. Never returned.",
                        "example": "+919876543210"
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 120,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                        "description": "Your customer's e-mail. Some channels pass one to the bank; without it Nice Pay sends a stand-in formed from `customer.ref`. Never returned.",
                        "example": "player@example.com"
                      }
                    },
                    "required": [
                      "ref"
                    ],
                    "additionalProperties": false
                  },
                  "risk_hints": {
                    "deprecated": true,
                    "description": "Deprecated and ignored: player risk is yours, and Nice Pay does not score payouts. Accepted (and not stored) for one release so an older client is not refused; stop sending it.",
                    "type": "object",
                    "properties": {
                      "customer_age_days": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 36500
                      },
                      "lifetime_deposits": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                        "example": "10000.00"
                      },
                      "lifetime_withdrawals": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                        "example": "10000.00"
                      },
                      "kyc_level": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 3
                      },
                      "flags": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-z_]{1,40}$"
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": {
                    "description": "Why: the purpose of this payment in your words, e.g. \"player deposit\" (≤ 200 characters). Shown on the payment and in exports.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "metadata": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_]{1,40}$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    }
                  }
                },
                "required": [
                  "merchant_payout_id",
                  "amount",
                  "currency",
                  "method",
                  "destination"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "po_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payout"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_payout_id": {
                      "type": "string"
                    },
                    "amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Null only on an imported USDT withdrawal whose amount sent was never recorded by the old system; it is never derived from an INR figure."
                    },
                    "fee": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "failure_reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "expired",
                            "cancelled_by_merchant",
                            "cannot_pay",
                            "destination_rejected",
                            "rail_closed",
                            "provider_refused",
                            "rejected_by_staff",
                            "timed_out_by_staff",
                            "negative_balance"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the payout ended unpaid: set when `status` is `failed` or `cancelled`, null otherwise (and on payouts that ended before 2026-11-28). Refund your customer on any of them; the value is for your people. `expired`: nothing had started within your expiry hours (24 unless agreed otherwise), counted from your request. `cancelled_by_merchant`: you cancelled it. `cannot_pay`: the desk it was given could not pay it. `destination_rejected`, `rail_closed`: Nice Pay ended it for that cause. `provider_refused`: the gateway or the chain refused or failed the transfer. `rejected_by_staff`: Nice Pay staff ended it. `timed_out_by_staff`: Nice Pay's withdrawal timeout ended it. `negative_balance`: it waited for funds and was not funded in time. A `payout.failed` event carries the same value."
                    },
                    "funding": {
                      "type": "string",
                      "enum": [
                        "funded",
                        "unfunded"
                      ],
                      "description": "`funded`: the amount and fee are reserved from your balance. `unfunded`: your balance could not cover it when you asked (or older payouts wait ahead of it); it is kept, nothing is reserved, and it goes on by itself — oldest first — when money arrives. One nobody funds within 24 hours fails with `failure_reason: negative_balance`. Nice Pay may also pay it into a negative balance (your `debt` then shows it)."
                    },
                    "held": {
                      "type": "boolean",
                      "description": "True while Nice Pay holds the payout for a person: a processing rule (an amount above what is paid without a person), one of Nice Pay's own safety stops, or an outcome being resolved. The payout is still yours to wait for; do not pay the customer another way."
                    },
                    "under_review": {
                      "type": "boolean",
                      "deprecated": true,
                      "description": "Deprecated: the same value as `held`, kept for one release."
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20"
                      ]
                    },
                    "destination": {
                      "type": "object",
                      "properties": {
                        "masked": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "masked"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeline": {
                      "description": "On GET /v1/payouts/{id}: every step, oldest first — requested, funded, admitted or held (and why), approved, assigned (a gateway, a desk or the chain executor), sent to the provider, the provider's answer, paid, completed, failed or reversed with the reason. Nice Pay staff are never named.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "step": {
                            "type": "string",
                            "enum": [
                              "requested",
                              "funded",
                              "admitted",
                              "held",
                              "approved",
                              "assigned",
                              "sent_to_provider",
                              "provider_answered",
                              "paid",
                              "completed",
                              "failed",
                              "cancelled",
                              "reversed"
                            ]
                          },
                          "detail": {
                            "description": "Why, or by what: the rule that held it, the kind of processor, the provider's answer, the failure reason.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "at",
                          "step",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "durations": {
                      "description": "On GET /v1/payouts/{id}: request → first assignment, assignment (or provider order) → completed, request → completed. Null until reached.",
                      "type": "object",
                      "properties": {
                        "seconds_to_assign": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_at_processor": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_total": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_assign",
                        "seconds_at_processor",
                        "seconds_total"
                      ],
                      "additionalProperties": false
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a withdrawal imported from your platform's old system, for reading; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported withdrawal; null on every payout made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "failure_reason",
                    "funding",
                    "held",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "description",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listPayouts",
        "summary": "List payouts",
        "tags": [
          "Payouts"
        ],
        "x-np-scope": "payouts:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "merchant_payout_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "processing",
                "sent",
                "succeeded",
                "failed",
                "cancelled",
                "reversed"
              ]
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "upi",
                "bank_transfer",
                "usdt_trc20",
                "usdt_bep20"
              ]
            }
          },
          {
            "name": "customer_ref",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Exact: a UTR or bank reference (spaces and case ignored) or a transaction hash.",
              "type": "string",
              "minLength": 6,
              "maxLength": 128
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "INR",
                "USDT"
              ]
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "amount_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
              "example": "10000.00"
            }
          },
          {
            "name": "amount_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
              "example": "10000.00"
            }
          },
          {
            "name": "legacy_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The id the payment had on your previous system, for payments imported into Nice Pay.",
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "imported",
            "in": "query",
            "required": false,
            "schema": {
              "default": "both",
              "description": "Imported history (`true`), payments made at Nice Pay (`false`), or both.",
              "type": "string",
              "enum": [
                "true",
                "false",
                "both"
              ]
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "po_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "payout"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "merchant_payout_id": {
                            "type": "string"
                          },
                          "amount": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Null only on an imported USDT withdrawal whose amount sent was never recorded by the old system; it is never derived from an INR figure."
                          },
                          "fee": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "processing",
                              "sent",
                              "succeeded",
                              "failed",
                              "cancelled",
                              "reversed"
                            ]
                          },
                          "failure_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "expired",
                                  "cancelled_by_merchant",
                                  "cannot_pay",
                                  "destination_rejected",
                                  "rail_closed",
                                  "provider_refused",
                                  "rejected_by_staff",
                                  "timed_out_by_staff",
                                  "negative_balance"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Why the payout ended unpaid: set when `status` is `failed` or `cancelled`, null otherwise (and on payouts that ended before 2026-11-28). Refund your customer on any of them; the value is for your people. `expired`: nothing had started within your expiry hours (24 unless agreed otherwise), counted from your request. `cancelled_by_merchant`: you cancelled it. `cannot_pay`: the desk it was given could not pay it. `destination_rejected`, `rail_closed`: Nice Pay ended it for that cause. `provider_refused`: the gateway or the chain refused or failed the transfer. `rejected_by_staff`: Nice Pay staff ended it. `timed_out_by_staff`: Nice Pay's withdrawal timeout ended it. `negative_balance`: it waited for funds and was not funded in time. A `payout.failed` event carries the same value."
                          },
                          "funding": {
                            "type": "string",
                            "enum": [
                              "funded",
                              "unfunded"
                            ],
                            "description": "`funded`: the amount and fee are reserved from your balance. `unfunded`: your balance could not cover it when you asked (or older payouts wait ahead of it); it is kept, nothing is reserved, and it goes on by itself — oldest first — when money arrives. One nobody funds within 24 hours fails with `failure_reason: negative_balance`. Nice Pay may also pay it into a negative balance (your `debt` then shows it)."
                          },
                          "held": {
                            "type": "boolean",
                            "description": "True while Nice Pay holds the payout for a person: a processing rule (an amount above what is paid without a person), one of Nice Pay's own safety stops, or an outcome being resolved. The payout is still yours to wait for; do not pay the customer another way."
                          },
                          "under_review": {
                            "type": "boolean",
                            "deprecated": true,
                            "description": "Deprecated: the same value as `held`, kept for one release."
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "upi",
                              "bank_transfer",
                              "usdt_trc20",
                              "usdt_bep20"
                            ]
                          },
                          "destination": {
                            "type": "object",
                            "properties": {
                              "masked": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "masked"
                            ],
                            "additionalProperties": false
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "ref": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "ref"
                            ],
                            "additionalProperties": false
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "completed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "timeline": {
                            "description": "On GET /v1/payouts/{id}: every step, oldest first — requested, funded, admitted or held (and why), approved, assigned (a gateway, a desk or the chain executor), sent to the provider, the provider's answer, paid, completed, failed or reversed with the reason. Nice Pay staff are never named.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "requested",
                                    "funded",
                                    "admitted",
                                    "held",
                                    "approved",
                                    "assigned",
                                    "sent_to_provider",
                                    "provider_answered",
                                    "paid",
                                    "completed",
                                    "failed",
                                    "cancelled",
                                    "reversed"
                                  ]
                                },
                                "detail": {
                                  "description": "Why, or by what: the rule that held it, the kind of processor, the provider's answer, the failure reason.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "at",
                                "step",
                                "detail"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "durations": {
                            "description": "On GET /v1/payouts/{id}: request → first assignment, assignment (or provider order) → completed, request → completed. Null until reached.",
                            "type": "object",
                            "properties": {
                              "seconds_to_assign": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "seconds_at_processor": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "seconds_total": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "seconds_to_assign",
                              "seconds_at_processor",
                              "seconds_total"
                            ],
                            "additionalProperties": false
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "imported": {
                            "type": "boolean",
                            "description": "True on a withdrawal imported from your platform's old system, for reading; write requests on it answer `409 imported_record`."
                          },
                          "legacy_id": {
                            "description": "Your old system's own id of an imported withdrawal; null on every payout made here.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "merchant_payout_id",
                          "amount",
                          "fee",
                          "currency",
                          "status",
                          "failure_reason",
                          "funding",
                          "held",
                          "under_review",
                          "method",
                          "destination",
                          "reference",
                          "description",
                          "customer",
                          "created_at",
                          "completed_at",
                          "metadata",
                          "imported",
                          "legacy_id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payouts/{id}": {
      "get": {
        "operationId": "getPayout",
        "summary": "Retrieve a payout",
        "tags": [
          "Payouts"
        ],
        "x-np-scope": "payouts:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "po_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payout"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_payout_id": {
                      "type": "string"
                    },
                    "amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Null only on an imported USDT withdrawal whose amount sent was never recorded by the old system; it is never derived from an INR figure."
                    },
                    "fee": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "failure_reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "expired",
                            "cancelled_by_merchant",
                            "cannot_pay",
                            "destination_rejected",
                            "rail_closed",
                            "provider_refused",
                            "rejected_by_staff",
                            "timed_out_by_staff",
                            "negative_balance"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the payout ended unpaid: set when `status` is `failed` or `cancelled`, null otherwise (and on payouts that ended before 2026-11-28). Refund your customer on any of them; the value is for your people. `expired`: nothing had started within your expiry hours (24 unless agreed otherwise), counted from your request. `cancelled_by_merchant`: you cancelled it. `cannot_pay`: the desk it was given could not pay it. `destination_rejected`, `rail_closed`: Nice Pay ended it for that cause. `provider_refused`: the gateway or the chain refused or failed the transfer. `rejected_by_staff`: Nice Pay staff ended it. `timed_out_by_staff`: Nice Pay's withdrawal timeout ended it. `negative_balance`: it waited for funds and was not funded in time. A `payout.failed` event carries the same value."
                    },
                    "funding": {
                      "type": "string",
                      "enum": [
                        "funded",
                        "unfunded"
                      ],
                      "description": "`funded`: the amount and fee are reserved from your balance. `unfunded`: your balance could not cover it when you asked (or older payouts wait ahead of it); it is kept, nothing is reserved, and it goes on by itself — oldest first — when money arrives. One nobody funds within 24 hours fails with `failure_reason: negative_balance`. Nice Pay may also pay it into a negative balance (your `debt` then shows it)."
                    },
                    "held": {
                      "type": "boolean",
                      "description": "True while Nice Pay holds the payout for a person: a processing rule (an amount above what is paid without a person), one of Nice Pay's own safety stops, or an outcome being resolved. The payout is still yours to wait for; do not pay the customer another way."
                    },
                    "under_review": {
                      "type": "boolean",
                      "deprecated": true,
                      "description": "Deprecated: the same value as `held`, kept for one release."
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20"
                      ]
                    },
                    "destination": {
                      "type": "object",
                      "properties": {
                        "masked": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "masked"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeline": {
                      "description": "On GET /v1/payouts/{id}: every step, oldest first — requested, funded, admitted or held (and why), approved, assigned (a gateway, a desk or the chain executor), sent to the provider, the provider's answer, paid, completed, failed or reversed with the reason. Nice Pay staff are never named.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "step": {
                            "type": "string",
                            "enum": [
                              "requested",
                              "funded",
                              "admitted",
                              "held",
                              "approved",
                              "assigned",
                              "sent_to_provider",
                              "provider_answered",
                              "paid",
                              "completed",
                              "failed",
                              "cancelled",
                              "reversed"
                            ]
                          },
                          "detail": {
                            "description": "Why, or by what: the rule that held it, the kind of processor, the provider's answer, the failure reason.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "at",
                          "step",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "durations": {
                      "description": "On GET /v1/payouts/{id}: request → first assignment, assignment (or provider order) → completed, request → completed. Null until reached.",
                      "type": "object",
                      "properties": {
                        "seconds_to_assign": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_at_processor": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_total": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_assign",
                        "seconds_at_processor",
                        "seconds_total"
                      ],
                      "additionalProperties": false
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a withdrawal imported from your platform's old system, for reading; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported withdrawal; null on every payout made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "failure_reason",
                    "funding",
                    "held",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "description",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payouts/{id}/cancel": {
      "post": {
        "operationId": "cancelPayout",
        "summary": "Cancel a payout nothing has started paying (409 payout_in_progress otherwise)",
        "tags": [
          "Payouts"
        ],
        "x-np-scope": "payouts:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "po_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "payout"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "merchant_payout_id": {
                      "type": "string"
                    },
                    "amount": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                          "example": "10000.00"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Null only on an imported USDT withdrawal whose amount sent was never recorded by the old system; it is never derived from an INR figure."
                    },
                    "fee": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "failure_reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "expired",
                            "cancelled_by_merchant",
                            "cannot_pay",
                            "destination_rejected",
                            "rail_closed",
                            "provider_refused",
                            "rejected_by_staff",
                            "timed_out_by_staff",
                            "negative_balance"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the payout ended unpaid: set when `status` is `failed` or `cancelled`, null otherwise (and on payouts that ended before 2026-11-28). Refund your customer on any of them; the value is for your people. `expired`: nothing had started within your expiry hours (24 unless agreed otherwise), counted from your request. `cancelled_by_merchant`: you cancelled it. `cannot_pay`: the desk it was given could not pay it. `destination_rejected`, `rail_closed`: Nice Pay ended it for that cause. `provider_refused`: the gateway or the chain refused or failed the transfer. `rejected_by_staff`: Nice Pay staff ended it. `timed_out_by_staff`: Nice Pay's withdrawal timeout ended it. `negative_balance`: it waited for funds and was not funded in time. A `payout.failed` event carries the same value."
                    },
                    "funding": {
                      "type": "string",
                      "enum": [
                        "funded",
                        "unfunded"
                      ],
                      "description": "`funded`: the amount and fee are reserved from your balance. `unfunded`: your balance could not cover it when you asked (or older payouts wait ahead of it); it is kept, nothing is reserved, and it goes on by itself — oldest first — when money arrives. One nobody funds within 24 hours fails with `failure_reason: negative_balance`. Nice Pay may also pay it into a negative balance (your `debt` then shows it)."
                    },
                    "held": {
                      "type": "boolean",
                      "description": "True while Nice Pay holds the payout for a person: a processing rule (an amount above what is paid without a person), one of Nice Pay's own safety stops, or an outcome being resolved. The payout is still yours to wait for; do not pay the customer another way."
                    },
                    "under_review": {
                      "type": "boolean",
                      "deprecated": true,
                      "description": "Deprecated: the same value as `held`, kept for one release."
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "upi",
                        "bank_transfer",
                        "usdt_trc20",
                        "usdt_bep20"
                      ]
                    },
                    "destination": {
                      "type": "object",
                      "properties": {
                        "masked": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "masked"
                      ],
                      "additionalProperties": false
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ref"
                      ],
                      "additionalProperties": false
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeline": {
                      "description": "On GET /v1/payouts/{id}: every step, oldest first — requested, funded, admitted or held (and why), approved, assigned (a gateway, a desk or the chain executor), sent to the provider, the provider's answer, paid, completed, failed or reversed with the reason. Nice Pay staff are never named.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "step": {
                            "type": "string",
                            "enum": [
                              "requested",
                              "funded",
                              "admitted",
                              "held",
                              "approved",
                              "assigned",
                              "sent_to_provider",
                              "provider_answered",
                              "paid",
                              "completed",
                              "failed",
                              "cancelled",
                              "reversed"
                            ]
                          },
                          "detail": {
                            "description": "Why, or by what: the rule that held it, the kind of processor, the provider's answer, the failure reason.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "at",
                          "step",
                          "detail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "durations": {
                      "description": "On GET /v1/payouts/{id}: request → first assignment, assignment (or provider order) → completed, request → completed. Null until reached.",
                      "type": "object",
                      "properties": {
                        "seconds_to_assign": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_at_processor": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seconds_total": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "seconds_to_assign",
                        "seconds_at_processor",
                        "seconds_total"
                      ],
                      "additionalProperties": false
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "imported": {
                      "type": "boolean",
                      "description": "True on a withdrawal imported from your platform's old system, for reading; write requests on it answer `409 imported_record`."
                    },
                    "legacy_id": {
                      "description": "Your old system's own id of an imported withdrawal; null on every payout made here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "failure_reason",
                    "funding",
                    "held",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "description",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata",
                    "imported",
                    "legacy_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payouts/{id}/checks": {
      "post": {
        "operationId": "createPayoutCheck",
        "summary": "Ask Nice Pay to check a payout that was sent (a thread)",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payouts:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 1000,
                    "description": "What to check, in your words: what your customer says happened. Plain text."
                  },
                  "reference": {
                    "description": "The reference your customer gave: a UTR, a bank reference or a transaction hash.",
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 64
                  },
                  "proof_upload_ids": {
                    "default": [],
                    "description": "Up to 12 images sent first with POST /v1/uploads (each used once).",
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 40,
                      "example": "upl_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    }
                  }
                },
                "required": [
                  "note"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "chk_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "check"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "payin",
                            "payout"
                          ]
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "answered",
                        "closed"
                      ],
                      "description": "`open`: Nice Pay is checking; `answered`: the desk or gateway answered (`answer`); `closed`: ended — a pay-in found and credited ends in `payin.succeeded`, a payout taken back in `payout.reversed`."
                    },
                    "answer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "confirmed",
                            "denied"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a pay-in: whether the money was found. For a payout: whether the desk confirms it paid."
                    },
                    "credited": {
                      "type": "boolean",
                      "description": "True when the check ended with the pay-in credited."
                    },
                    "waiting_for": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "nice_pay",
                            "merchant"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whose turn it is in the thread; null once closed."
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "close_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "answered_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Nice Pay first answered in the thread."
                    },
                    "closed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "check_message"
                          },
                          "author": {
                            "type": "string",
                            "enum": [
                              "merchant",
                              "nice_pay"
                            ]
                          },
                          "body": {
                            "type": "string"
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content_type": {
                                  "type": "string"
                                },
                                "url": {
                                  "description": "A link to the image for five minutes; fetch the check again for a new one. Null in events.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expires_at": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "content_type",
                                "url",
                                "expires_at"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "author",
                          "body",
                          "files",
                          "created_at"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The thread between you and Nice Pay, oldest first. The first message is your note."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "payment",
                    "status",
                    "answer",
                    "credited",
                    "waiting_for",
                    "reference",
                    "note",
                    "close_reason",
                    "created_at",
                    "answered_at",
                    "closed_at",
                    "messages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/checks": {
      "get": {
        "operationId": "listChecks",
        "summary": "List your payment checks (threads)",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payins:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "`open`: still being checked (open or answered); `closed`: ended.",
              "type": "string",
              "enum": [
                "open",
                "closed"
              ]
            }
          },
          {
            "name": "payin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "payout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "chk_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "check"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "payment": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "payin",
                                  "payout"
                                ]
                              },
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "answered",
                              "closed"
                            ],
                            "description": "`open`: Nice Pay is checking; `answered`: the desk or gateway answered (`answer`); `closed`: ended — a pay-in found and credited ends in `payin.succeeded`, a payout taken back in `payout.reversed`."
                          },
                          "answer": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "confirmed",
                                  "denied"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "For a pay-in: whether the money was found. For a payout: whether the desk confirms it paid."
                          },
                          "credited": {
                            "type": "boolean",
                            "description": "True when the check ended with the pay-in credited."
                          },
                          "waiting_for": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "nice_pay",
                                  "merchant"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Whose turn it is in the thread; null once closed."
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "close_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "answered_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "When Nice Pay first answered in the thread."
                          },
                          "closed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messages": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "const": "check_message"
                                },
                                "author": {
                                  "type": "string",
                                  "enum": [
                                    "merchant",
                                    "nice_pay"
                                  ]
                                },
                                "body": {
                                  "type": "string"
                                },
                                "files": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content_type": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "A link to the image for five minutes; fetch the check again for a new one. Null in events.",
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "expires_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content_type",
                                      "url",
                                      "expires_at"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "object",
                                "author",
                                "body",
                                "files",
                                "created_at"
                              ],
                              "additionalProperties": false
                            },
                            "description": "The thread between you and Nice Pay, oldest first. The first message is your note."
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "payment",
                          "status",
                          "answer",
                          "credited",
                          "waiting_for",
                          "reference",
                          "note",
                          "close_reason",
                          "created_at",
                          "answered_at",
                          "closed_at",
                          "messages"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/checks/{id}": {
      "get": {
        "operationId": "getCheck",
        "summary": "Retrieve a payment check and its thread",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payins:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "chk_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "check"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "payin",
                            "payout"
                          ]
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "answered",
                        "closed"
                      ],
                      "description": "`open`: Nice Pay is checking; `answered`: the desk or gateway answered (`answer`); `closed`: ended — a pay-in found and credited ends in `payin.succeeded`, a payout taken back in `payout.reversed`."
                    },
                    "answer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "confirmed",
                            "denied"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a pay-in: whether the money was found. For a payout: whether the desk confirms it paid."
                    },
                    "credited": {
                      "type": "boolean",
                      "description": "True when the check ended with the pay-in credited."
                    },
                    "waiting_for": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "nice_pay",
                            "merchant"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whose turn it is in the thread; null once closed."
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "close_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "answered_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Nice Pay first answered in the thread."
                    },
                    "closed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "check_message"
                          },
                          "author": {
                            "type": "string",
                            "enum": [
                              "merchant",
                              "nice_pay"
                            ]
                          },
                          "body": {
                            "type": "string"
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content_type": {
                                  "type": "string"
                                },
                                "url": {
                                  "description": "A link to the image for five minutes; fetch the check again for a new one. Null in events.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expires_at": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "content_type",
                                "url",
                                "expires_at"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "author",
                          "body",
                          "files",
                          "created_at"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The thread between you and Nice Pay, oldest first. The first message is your note."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "payment",
                    "status",
                    "answer",
                    "credited",
                    "waiting_for",
                    "reference",
                    "note",
                    "close_reason",
                    "created_at",
                    "answered_at",
                    "closed_at",
                    "messages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/checks/{id}/messages": {
      "post": {
        "operationId": "createCheckMessage",
        "summary": "Add a message to a payment check",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "proof_upload_ids": {
                    "default": [],
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 5,
                      "maxLength": 40,
                      "example": "upl_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    }
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "chk_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "check"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "payin",
                            "payout"
                          ]
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "answered",
                        "closed"
                      ],
                      "description": "`open`: Nice Pay is checking; `answered`: the desk or gateway answered (`answer`); `closed`: ended — a pay-in found and credited ends in `payin.succeeded`, a payout taken back in `payout.reversed`."
                    },
                    "answer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "confirmed",
                            "denied"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a pay-in: whether the money was found. For a payout: whether the desk confirms it paid."
                    },
                    "credited": {
                      "type": "boolean",
                      "description": "True when the check ended with the pay-in credited."
                    },
                    "waiting_for": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "nice_pay",
                            "merchant"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whose turn it is in the thread; null once closed."
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "close_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "answered_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When Nice Pay first answered in the thread."
                    },
                    "closed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "check_message"
                          },
                          "author": {
                            "type": "string",
                            "enum": [
                              "merchant",
                              "nice_pay"
                            ]
                          },
                          "body": {
                            "type": "string"
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content_type": {
                                  "type": "string"
                                },
                                "url": {
                                  "description": "A link to the image for five minutes; fetch the check again for a new one. Null in events.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expires_at": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "content_type",
                                "url",
                                "expires_at"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "author",
                          "body",
                          "files",
                          "created_at"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The thread between you and Nice Pay, oldest first. The first message is your note."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "payment",
                    "status",
                    "answer",
                    "credited",
                    "waiting_for",
                    "reference",
                    "note",
                    "close_reason",
                    "created_at",
                    "answered_at",
                    "closed_at",
                    "messages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "createUpload",
        "summary": "Send a proof image for a check (the raw image as the body)",
        "tags": [
          "Checks"
        ],
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "check_proof"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "upl_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "upload"
                    },
                    "purpose": {
                      "type": "string",
                      "const": "check_proof"
                    },
                    "content_type": {
                      "type": "string",
                      "enum": [
                        "image/png",
                        "image/jpeg"
                      ]
                    },
                    "byte_size": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Use the id in a check or a message before this, or send the image again."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "purpose",
                    "content_type",
                    "byte_size",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balances": {
      "get": {
        "operationId": "getBalances",
        "summary": "Balances per currency",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "balances:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "balances"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Your one balance in this currency: everything Nice Pay holds for you — `available` + `frozen` − `debt`. This is the figure to show as your balance at Nice Pay (one record per currency; USDT is one balance across both chains, see `by_chain`). Negative only when you owe Nice Pay more than it holds."
                          },
                          "available": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "The part of `total` you can spend now: payouts and settlements draw on it."
                          },
                          "frozen": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "The part of `total` you cannot spend yet: `pending` + `reserved` + `held`. It is still yours and is counted in `total`."
                          },
                          "pending": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "Part of `frozen`: money received that is not yet released to `available`."
                          },
                          "reserved": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "Part of `frozen`: set aside for your payouts and settlements in flight (amount plus fee), until each one ends."
                          },
                          "held": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "Part of `frozen`: put on hold by Nice Pay; not spendable until released. Always the sum of `holds`."
                          },
                          "holds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": "hold_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                                },
                                "object": {
                                  "type": "string",
                                  "const": "hold"
                                },
                                "amount": {
                                  "type": "string",
                                  "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "example": "10000.00"
                                },
                                "comment": {
                                  "type": "string",
                                  "description": "Why the amount is on hold, as written by Nice Pay. Plain text."
                                },
                                "placed_at": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "object",
                                "amount",
                                "comment",
                                "placed_at"
                              ],
                              "additionalProperties": false
                            },
                            "description": "The holds that make up `held`, newest first."
                          },
                          "debt": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "What you owe Nice Pay: a payout Nice Pay paid into a negative balance, or a credit taken back that your balance could not cover. Money arriving repays it first."
                          },
                          "net": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "`available` − `debt`; negative when you owe more than you can spend."
                          },
                          "unfunded_payouts": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "Amount plus fee of your payouts waiting for funds (`funding: unfunded`), not yet taken from any figure above."
                          },
                          "projected": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "`net` − `unfunded_payouts`: where your balance stands once the waiting payouts are paid. Negative means the account is going negative."
                          },
                          "by_chain": {
                            "description": "USDT only: `total` by the chain the money came in or went out on (every pay-in, payout, settlement and fee takes the chain of its rail; an entry with no rail names one). One balance: a payout on either chain spends it, so one chain may be negative while the total is positive. The amounts add up to `total`.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "chain": {
                                  "type": "string",
                                  "enum": [
                                    "tron",
                                    "bsc"
                                  ]
                                },
                                "amount": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                                }
                              },
                              "required": [
                                "chain",
                                "amount"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "currency",
                          "total",
                          "available",
                          "frozen",
                          "pending",
                          "reserved",
                          "held",
                          "holds",
                          "debt",
                          "net",
                          "unfunded_payouts",
                          "projected"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balance-transactions": {
      "get": {
        "operationId": "listBalanceTransactions",
        "summary": "Ledger entries of the merchant",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "balances:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "default": "INR",
              "type": "string",
              "enum": [
                "INR",
                "USDT"
              ]
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "balance_transaction"
                          },
                          "type": {
                            "type": "string"
                          },
                          "account": {
                            "type": "string",
                            "enum": [
                              "available",
                              "pending",
                              "reserved",
                              "held",
                              "debt"
                            ]
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "source": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "note": {
                            "description": "For `hold.place`, `hold.release` and `balance.recover`: the comment or reason Nice Pay wrote. Null otherwise.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "type",
                          "account",
                          "amount",
                          "currency",
                          "source",
                          "note",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/statements": {
      "get": {
        "operationId": "getStatement",
        "summary": "The statement of one business day: opening, money in and out, fees, adjustments, closing (per chain for USDT)",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "balances:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "example": "2026-11-01"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "statement"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "day": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string",
                      "description": "The zone of the business day (Nice Pay's, the same day boundary its daily close uses)."
                    },
                    "final": {
                      "type": "boolean",
                      "description": "True once Nice Pay's close of this day is signed: the figures never change again. A day still open, and every test-mode day, is false."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "opening": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                          },
                          "money_in": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Pay-ins and top-ups received, before their fees."
                          },
                          "money_out": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Payouts and settlements sent (their amounts; a payout sent back is subtracted)."
                          },
                          "fees": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Fees on the day's money in and out."
                          },
                          "adjustments": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Reversals, recoveries, openings and other entries made by Nice Pay."
                          },
                          "late": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "description": "Entries dated an earlier day that reached the ledger after Nice Pay closed that day."
                          },
                          "closing": {
                            "type": "string",
                            "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                          },
                          "by_chain": {
                            "description": "USDT only: the same figures per chain.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "chain": {
                                  "type": "string",
                                  "enum": [
                                    "tron",
                                    "bsc"
                                  ]
                                },
                                "opening": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                                },
                                "money_in": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "description": "Pay-ins and top-ups received, before their fees."
                                },
                                "money_out": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "description": "Payouts and settlements sent (their amounts; a payout sent back is subtracted)."
                                },
                                "fees": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "description": "Fees on the day's money in and out."
                                },
                                "adjustments": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "description": "Reversals, recoveries, openings and other entries made by Nice Pay."
                                },
                                "late": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                  "description": "Entries dated an earlier day that reached the ledger after Nice Pay closed that day."
                                },
                                "closing": {
                                  "type": "string",
                                  "pattern": "^-?(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
                                }
                              },
                              "required": [
                                "chain",
                                "opening",
                                "money_in",
                                "money_out",
                                "fees",
                                "adjustments",
                                "late",
                                "closing"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "currency",
                          "opening",
                          "money_in",
                          "money_out",
                          "fees",
                          "adjustments",
                          "late",
                          "closing"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "day",
                    "timezone",
                    "final",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/methods": {
      "get": {
        "operationId": "listMethods",
        "summary": "Methods available to this project, with fees",
        "tags": [
          "Utilities"
        ],
        "x-np-scope": null,
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "method": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "upi",
                                  "bank_transfer",
                                  "usdt_trc20",
                                  "usdt_bep20",
                                  "auto"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "upi",
                                  "bank_transfer",
                                  "usdt_trc20",
                                  "usdt_bep20"
                                ]
                              }
                            ]
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "payin",
                              "payout"
                            ]
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "available": {
                            "type": "boolean",
                            "description": "Whether you can use the method now. Live mode: a pay-in method when something on your routing can take it at this moment (a desk or a gateway that is on, healthy and priced for you; for USDT, your wallet profile can give an address), a payout method when it is priced for you and payouts are not stopped (a UPI payout also needs UPI payouts enabled for you: only the UPI channel or a Nice Pay desk on your payout routes pays UPI). Test mode: when the method is priced on the simulated rail. Read it again before you show a method: it changes as rails go up and down."
                          },
                          "fee": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "bps": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "fixed": {
                                    "type": "string",
                                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                    "example": "10000.00"
                                  },
                                  "min": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                        "example": "10000.00"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "max": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                        "example": "10000.00"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "bands": {
                                    "description": "When your fee depends on the amount (USDT pay-ins): one entry per band, lowest first, contiguous from 0. A payment's fee is the band its amount received falls in. `bps` and `fixed` above are then the highest a band takes.",
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "from_amount": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                          "example": "10000.00",
                                          "description": "The band starts at this amount (inclusive)."
                                        },
                                        "to_amount": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                              "example": "10000.00"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The band ends below this amount (exclusive); null: no upper end."
                                        },
                                        "bps": {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991,
                                          "description": "Your whole percentage fee in this band, in basis points."
                                        },
                                        "fixed": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                          "example": "10000.00",
                                          "description": "Your flat fee in this band."
                                        }
                                      },
                                      "required": [
                                        "from_amount",
                                        "to_amount",
                                        "bps",
                                        "fixed"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "bps",
                                  "fixed",
                                  "min",
                                  "max"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Your fee for the method, from the rule that would price it now. Null when nothing prices it (then `available` is false)."
                          },
                          "min_amount": {
                            "description": "Live mode: the smallest amount something can take now, never below your own per-payment minimum; null when not known. Absent in test mode.",
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "max_amount": {
                            "description": "Live mode: the largest amount something can take now, never above your own per-payment maximum; null when not known. Absent in test mode.",
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                "example": "10000.00"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "switched_off": {
                            "description": "Live mode: present when Nice Pay has switched this currency off for you — `fiat` (INR) or `crypto` (USDT); the method is then not available.",
                            "type": "string",
                            "enum": [
                              "fiat",
                              "crypto"
                            ]
                          },
                          "channels": {
                            "description": "Live mode, INR pay-in methods: the same answer for each channel you can name in `POST /v1/payins` (`desk`, `gateway`, and each gateway channel: `upi`, `qr`, `instant`, `qr_lite`, `qr_2`, `bank`), so a page offering a desk's QR and a channel's payment page separately can show each only while it can be used. A channel not on your routes is listed as not available. Absent in test mode and on other methods.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "desk",
                                    "gateway",
                                    "upi",
                                    "qr",
                                    "instant",
                                    "qr_lite",
                                    "qr_2",
                                    "bank"
                                  ]
                                },
                                "available": {
                                  "type": "boolean"
                                },
                                "min_amount": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                      "example": "10000.00"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "max_amount": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                                      "example": "10000.00"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "channel",
                                "available",
                                "min_amount",
                                "max_amount"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "method",
                          "direction",
                          "currency",
                          "available",
                          "fee"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/test/payins/{id}/simulate": {
      "post": {
        "operationId": "simulatePayin",
        "summary": "Test mode: move a pay-in",
        "tags": [
          "Test mode"
        ],
        "description": "Test mode only: refused for live keys.",
        "x-np-scope": "payins:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "succeed",
                      "fail",
                      "expire",
                      "partial"
                    ]
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                    "example": "10000.00"
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "simulation"
                    },
                    "queued": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "queued"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/test/payouts/{id}/simulate": {
      "post": {
        "operationId": "simulatePayout",
        "summary": "Test mode: move a payout",
        "tags": [
          "Test mode"
        ],
        "description": "Test mode only: refused for live keys.",
        "x-np-scope": "payouts:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "succeed",
                      "fail",
                      "reverse"
                    ]
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "simulation"
                    },
                    "queued": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "queued"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/test/crypto/transfers": {
      "post": {
        "operationId": "simulateCryptoTransfer",
        "summary": "Test mode: a confirmed USDT transfer to a customer address",
        "tags": [
          "Test mode"
        ],
        "description": "Test mode only: refused for live keys.",
        "x-np-scope": "crypto:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9]+$"
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                    "example": "10000.00"
                  }
                },
                "required": [
                  "address",
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "simulation"
                    },
                    "queued": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "queued"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/settlements": {
      "post": {
        "operationId": "createSettlement",
        "summary": "Request a settlement to a registered destination",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "settlements:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                    "example": "10000.00"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "INR",
                      "USDT"
                    ]
                  },
                  "destination_id": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "outside_hours_ack": {
                    "description": "Outside the working hours (09:00–18:00 IST) a settlement is refused with `409 outside_working_hours` and the warning \"This is not working hours. The payment gets delayed, and it can cause deviation in treasury calculations if it's not settled today.\" Send `true` once whoever asked has read it, and the settlement goes ahead. Inside the hours it is not needed and changes nothing.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "amount",
                  "currency",
                  "destination_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "st_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "settlement"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "queue",
                        "manual_usdt"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "fee": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "destination": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "initiated_by": {
                      "type": "string",
                      "enum": [
                        "merchant",
                        "platform"
                      ],
                      "description": "`platform`: started by Nice Pay on your behalf, to one of your own destinations."
                    },
                    "usdt_amount": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "chain": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tx_hash": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "method",
                    "status",
                    "amount",
                    "fee",
                    "currency",
                    "destination",
                    "initiated_by",
                    "usdt_amount",
                    "rate",
                    "chain",
                    "tx_hash",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listSettlements",
        "summary": "List settlements",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "settlements:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "st_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "settlement"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "queue",
                              "manual_usdt"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "fee": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "destination": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "masked": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "masked"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "initiated_by": {
                            "type": "string",
                            "enum": [
                              "merchant",
                              "platform"
                            ],
                            "description": "`platform`: started by Nice Pay on your behalf, to one of your own destinations."
                          },
                          "usdt_amount": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "chain": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tx_hash": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "method",
                          "status",
                          "amount",
                          "fee",
                          "currency",
                          "destination",
                          "initiated_by",
                          "usdt_amount",
                          "rate",
                          "chain",
                          "tx_hash",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/settlements/{id}": {
      "get": {
        "operationId": "getSettlement",
        "summary": "Retrieve a settlement",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "settlements:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "st_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "settlement"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "queue",
                        "manual_usdt"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "fee": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                      "example": "10000.00"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "destination": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "masked": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "masked"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "initiated_by": {
                      "type": "string",
                      "enum": [
                        "merchant",
                        "platform"
                      ],
                      "description": "`platform`: started by Nice Pay on your behalf, to one of your own destinations."
                    },
                    "usdt_amount": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "chain": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tx_hash": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "method",
                    "status",
                    "amount",
                    "fee",
                    "currency",
                    "destination",
                    "initiated_by",
                    "usdt_amount",
                    "rate",
                    "chain",
                    "tx_hash",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/settlement-destinations": {
      "get": {
        "operationId": "listSettlementDestinations",
        "summary": "Destinations registered in the portal",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "settlements:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "settlement_destination"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "masked": {
                            "type": "string"
                          },
                          "usable_after": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "usable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "kind",
                          "masked",
                          "usable_after",
                          "usable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/topups": {
      "get": {
        "operationId": "listTopups",
        "summary": "The merchant's top-ups (prefunding)",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "balances:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "topup"
                          },
                          "status": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "INR",
                              "USDT"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "status",
                          "amount",
                          "currency",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/topup-addresses": {
      "get": {
        "operationId": "listTopupAddresses",
        "summary": "The project's USDT top-up address per chain",
        "tags": [
          "Balances"
        ],
        "x-np-scope": "balances:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "topup_address"
                          },
                          "chain": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "object",
                          "chain",
                          "address"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/crypto/addresses": {
      "post": {
        "operationId": "createCryptoAddress",
        "summary": "Get or create a customer's permanent USDT address",
        "tags": [
          "Crypto"
        ],
        "x-np-scope": "crypto:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "customer_ref": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "tron",
                      "bsc"
                    ]
                  }
                },
                "required": [
                  "customer_ref",
                  "chain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "const": "crypto_address"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string",
                      "enum": [
                        "tron",
                        "bsc"
                      ]
                    },
                    "asset": {
                      "type": "string",
                      "const": "USDT"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "address",
                    "chain",
                    "asset",
                    "customer_ref",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listCryptoAddresses",
        "summary": "List customer addresses",
        "tags": [
          "Crypto"
        ],
        "x-np-scope": "crypto:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "customer_ref",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "tron",
                "bsc"
              ]
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "const": "crypto_address"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "address": {
                            "type": "string"
                          },
                          "chain": {
                            "type": "string",
                            "enum": [
                              "tron",
                              "bsc"
                            ]
                          },
                          "asset": {
                            "type": "string",
                            "const": "USDT"
                          },
                          "customer_ref": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "address",
                          "chain",
                          "asset",
                          "customer_ref",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/crypto/addresses/{id}": {
      "get": {
        "operationId": "getCryptoAddress",
        "summary": "Retrieve a customer address",
        "tags": [
          "Crypto"
        ],
        "x-np-scope": "crypto:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "const": "crypto_address"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string",
                      "enum": [
                        "tron",
                        "bsc"
                      ]
                    },
                    "asset": {
                      "type": "string",
                      "const": "USDT"
                    },
                    "customer_ref": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "address",
                    "chain",
                    "asset",
                    "customer_ref",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reference-rates": {
      "get": {
        "operationId": "getReferenceRates",
        "summary": "Removed: Nice Pay keeps no USDT price",
        "tags": [
          "Utilities"
        ],
        "x-np-scope": null,
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "deprecated": true,
        "description": "Removed (decision 0096): it answers `410 gone` for one release, then leaves the API.",
        "responses": {
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "x-np-scope": "events:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "after_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "payin.created",
                    "payin.processing",
                    "payin.succeeded",
                    "payin.failed",
                    "payin.expired",
                    "payin.cancelled",
                    "payin.reversed",
                    "crypto.transfer.detected",
                    "crypto.transfer.confirmed",
                    "payout.processing",
                    "payout.sent",
                    "payout.succeeded",
                    "payout.failed",
                    "payout.reversed",
                    "settlement.approved",
                    "settlement.paid",
                    "settlement.completed",
                    "settlement.rejected",
                    "topup.succeeded",
                    "balance.released",
                    "merchant.frozen",
                    "merchant.unfrozen",
                    "webhook_endpoint.disabled",
                    "report.ready",
                    "check.answered",
                    "check.message",
                    "check.closed"
                  ]
                },
                {
                  "maxItems": 27,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "payin.created",
                      "payin.processing",
                      "payin.succeeded",
                      "payin.failed",
                      "payin.expired",
                      "payin.cancelled",
                      "payin.reversed",
                      "crypto.transfer.detected",
                      "crypto.transfer.confirmed",
                      "payout.processing",
                      "payout.sent",
                      "payout.succeeded",
                      "payout.failed",
                      "payout.reversed",
                      "settlement.approved",
                      "settlement.paid",
                      "settlement.completed",
                      "settlement.rejected",
                      "topup.succeeded",
                      "balance.released",
                      "merchant.frozen",
                      "merchant.unfrozen",
                      "webhook_endpoint.disabled",
                      "report.ready",
                      "check.answered",
                      "check.message",
                      "check.closed"
                    ]
                  }
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "evt_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "event"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "payin.created",
                              "payin.processing",
                              "payin.succeeded",
                              "payin.failed",
                              "payin.expired",
                              "payin.cancelled",
                              "payin.reversed",
                              "crypto.transfer.detected",
                              "crypto.transfer.confirmed",
                              "payout.processing",
                              "payout.sent",
                              "payout.succeeded",
                              "payout.failed",
                              "payout.reversed",
                              "settlement.approved",
                              "settlement.paid",
                              "settlement.completed",
                              "settlement.rejected",
                              "topup.succeeded",
                              "balance.released",
                              "merchant.frozen",
                              "merchant.unfrozen",
                              "webhook_endpoint.disabled",
                              "report.ready",
                              "check.answered",
                              "check.message",
                              "check.closed"
                            ]
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "api_version": {
                            "type": "string"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "data": {
                            "type": "object",
                            "properties": {
                              "object": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "object"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "type",
                          "livemode",
                          "api_version",
                          "sequence",
                          "created_at",
                          "data"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "summary": "Retrieve an event",
        "tags": [
          "Events"
        ],
        "x-np-scope": "events:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "evt_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "event"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "payin.created",
                        "payin.processing",
                        "payin.succeeded",
                        "payin.failed",
                        "payin.expired",
                        "payin.cancelled",
                        "payin.reversed",
                        "crypto.transfer.detected",
                        "crypto.transfer.confirmed",
                        "payout.processing",
                        "payout.sent",
                        "payout.succeeded",
                        "payout.failed",
                        "payout.reversed",
                        "settlement.approved",
                        "settlement.paid",
                        "settlement.completed",
                        "settlement.rejected",
                        "topup.succeeded",
                        "balance.released",
                        "merchant.frozen",
                        "merchant.unfrozen",
                        "webhook_endpoint.disabled",
                        "report.ready",
                        "check.answered",
                        "check.message",
                        "check.closed"
                      ]
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "object"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "type",
                    "livemode",
                    "api_version",
                    "sequence",
                    "created_at",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}/redeliver": {
      "post": {
        "operationId": "redeliverEvent",
        "summary": "Send an event to the webhook endpoints again",
        "tags": [
          "Events"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "redelivery"
                    },
                    "queued": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "object",
                    "queued"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "summary": "List webhook endpoints",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                          },
                          "object": {
                            "type": "string",
                            "const": "webhook_endpoint"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string"
                          },
                          "event_types": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "payin.created",
                                "payin.processing",
                                "payin.succeeded",
                                "payin.failed",
                                "payin.expired",
                                "payin.cancelled",
                                "payin.reversed",
                                "crypto.transfer.detected",
                                "crypto.transfer.confirmed",
                                "payout.processing",
                                "payout.sent",
                                "payout.succeeded",
                                "payout.failed",
                                "payout.reversed",
                                "settlement.approved",
                                "settlement.paid",
                                "settlement.completed",
                                "settlement.rejected",
                                "topup.succeeded",
                                "balance.released",
                                "merchant.frozen",
                                "merchant.unfrozen",
                                "webhook_endpoint.disabled",
                                "report.ready",
                                "check.answered",
                                "check.message",
                                "check.closed"
                              ]
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "enabled",
                              "disabled"
                            ]
                          },
                          "disabled_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "api_version": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "url",
                          "event_types",
                          "status",
                          "disabled_reason",
                          "description",
                          "api_version",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "summary": "Add a webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "event_types": {
                    "default": [],
                    "maxItems": 27,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "payin.created",
                        "payin.processing",
                        "payin.succeeded",
                        "payin.failed",
                        "payin.expired",
                        "payin.cancelled",
                        "payin.reversed",
                        "crypto.transfer.detected",
                        "crypto.transfer.confirmed",
                        "payout.processing",
                        "payout.sent",
                        "payout.succeeded",
                        "payout.failed",
                        "payout.reversed",
                        "settlement.approved",
                        "settlement.paid",
                        "settlement.completed",
                        "settlement.rejected",
                        "topup.succeeded",
                        "balance.released",
                        "merchant.frozen",
                        "merchant.unfrozen",
                        "webhook_endpoint.disabled",
                        "report.ready",
                        "check.answered",
                        "check.message",
                        "check.closed"
                      ]
                    }
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "webhook_endpoint"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string"
                    },
                    "event_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "payin.created",
                          "payin.processing",
                          "payin.succeeded",
                          "payin.failed",
                          "payin.expired",
                          "payin.cancelled",
                          "payin.reversed",
                          "crypto.transfer.detected",
                          "crypto.transfer.confirmed",
                          "payout.processing",
                          "payout.sent",
                          "payout.succeeded",
                          "payout.failed",
                          "payout.reversed",
                          "settlement.approved",
                          "settlement.paid",
                          "settlement.completed",
                          "settlement.rejected",
                          "topup.succeeded",
                          "balance.released",
                          "merchant.frozen",
                          "merchant.unfrozen",
                          "webhook_endpoint.disabled",
                          "report.ready",
                          "check.answered",
                          "check.message",
                          "check.closed"
                        ]
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "enabled",
                        "disabled"
                      ]
                    },
                    "disabled_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "url",
                    "event_types",
                    "status",
                    "disabled_reason",
                    "description",
                    "api_version",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "get": {
        "operationId": "getWebhookEndpoint",
        "summary": "Retrieve a webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "webhook_endpoint"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string"
                    },
                    "event_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "payin.created",
                          "payin.processing",
                          "payin.succeeded",
                          "payin.failed",
                          "payin.expired",
                          "payin.cancelled",
                          "payin.reversed",
                          "crypto.transfer.detected",
                          "crypto.transfer.confirmed",
                          "payout.processing",
                          "payout.sent",
                          "payout.succeeded",
                          "payout.failed",
                          "payout.reversed",
                          "settlement.approved",
                          "settlement.paid",
                          "settlement.completed",
                          "settlement.rejected",
                          "topup.succeeded",
                          "balance.released",
                          "merchant.frozen",
                          "merchant.unfrozen",
                          "webhook_endpoint.disabled",
                          "report.ready",
                          "check.answered",
                          "check.message",
                          "check.closed"
                        ]
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "enabled",
                        "disabled"
                      ]
                    },
                    "disabled_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "url",
                    "event_types",
                    "status",
                    "disabled_reason",
                    "description",
                    "api_version",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Change a webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "event_types": {
                    "maxItems": 27,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "payin.created",
                        "payin.processing",
                        "payin.succeeded",
                        "payin.failed",
                        "payin.expired",
                        "payin.cancelled",
                        "payin.reversed",
                        "crypto.transfer.detected",
                        "crypto.transfer.confirmed",
                        "payout.processing",
                        "payout.sent",
                        "payout.succeeded",
                        "payout.failed",
                        "payout.reversed",
                        "settlement.approved",
                        "settlement.paid",
                        "settlement.completed",
                        "settlement.rejected",
                        "topup.succeeded",
                        "balance.released",
                        "merchant.frozen",
                        "merchant.unfrozen",
                        "webhook_endpoint.disabled",
                        "report.ready",
                        "check.answered",
                        "check.message",
                        "check.closed"
                      ]
                    }
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "webhook_endpoint"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string"
                    },
                    "event_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "payin.created",
                          "payin.processing",
                          "payin.succeeded",
                          "payin.failed",
                          "payin.expired",
                          "payin.cancelled",
                          "payin.reversed",
                          "crypto.transfer.detected",
                          "crypto.transfer.confirmed",
                          "payout.processing",
                          "payout.sent",
                          "payout.succeeded",
                          "payout.failed",
                          "payout.reversed",
                          "settlement.approved",
                          "settlement.paid",
                          "settlement.completed",
                          "settlement.rejected",
                          "topup.succeeded",
                          "balance.released",
                          "merchant.frozen",
                          "merchant.unfrozen",
                          "webhook_endpoint.disabled",
                          "report.ready",
                          "check.answered",
                          "check.message",
                          "check.closed"
                        ]
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "enabled",
                        "disabled"
                      ]
                    },
                    "disabled_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "url",
                    "event_types",
                    "status",
                    "disabled_reason",
                    "description",
                    "api_version",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookEndpoint",
        "summary": "Remove a webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": "webhooks:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stream/tokens": {
      "post": {
        "operationId": "createStreamToken",
        "summary": "A 60-second, single-use WebSocket token",
        "tags": [
          "Events"
        ],
        "x-np-scope": "events:read",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "types": {
                    "default": [],
                    "maxItems": 27,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "payin.created",
                        "payin.processing",
                        "payin.succeeded",
                        "payin.failed",
                        "payin.expired",
                        "payin.cancelled",
                        "payin.reversed",
                        "crypto.transfer.detected",
                        "crypto.transfer.confirmed",
                        "payout.processing",
                        "payout.sent",
                        "payout.succeeded",
                        "payout.failed",
                        "payout.reversed",
                        "settlement.approved",
                        "settlement.paid",
                        "settlement.completed",
                        "settlement.rejected",
                        "topup.succeeded",
                        "balance.released",
                        "merchant.frozen",
                        "merchant.unfrozen",
                        "webhook_endpoint.disabled",
                        "report.ready",
                        "check.answered",
                        "check.message",
                        "check.closed"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "stream_token"
                    },
                    "token": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "object",
                    "token",
                    "url",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports": {
      "post": {
        "operationId": "createReport",
        "summary": "Request a CSV export (balance transactions, pay-ins or payouts)",
        "tags": [
          "Reports"
        ],
        "x-np-scope": "reports:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "balance_transactions",
                      "payins",
                      "payouts"
                    ]
                  },
                  "currency": {
                    "default": "INR",
                    "type": "string",
                    "enum": [
                      "INR",
                      "USDT"
                    ]
                  },
                  "from": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "example": "2026-11-01"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "example": "2026-11-01"
                  }
                },
                "required": [
                  "kind",
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rep_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "report"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "balance_transactions",
                        "payins",
                        "payouts"
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "from": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "example": "2026-11-01"
                    },
                    "to": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "example": "2026-11-01"
                    },
                    "time_zone": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "ready",
                        "failed"
                      ]
                    },
                    "row_count": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha256": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ready_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "download_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "download_expires_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "kind",
                    "currency",
                    "from",
                    "to",
                    "time_zone",
                    "status",
                    "row_count",
                    "sha256",
                    "error",
                    "created_at",
                    "ready_at",
                    "download_url",
                    "download_expires_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{id}": {
      "get": {
        "operationId": "getReport",
        "summary": "Retrieve an export and its download link",
        "tags": [
          "Reports"
        ],
        "x-np-scope": "reports:write",
        "security": [
          {
            "NP1": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rep_01JD3QH2Y8ZKX4M9T6V0R1B2C3"
                    },
                    "object": {
                      "type": "string",
                      "const": "report"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "balance_transactions",
                        "payins",
                        "payouts"
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "INR",
                        "USDT"
                      ]
                    },
                    "from": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "example": "2026-11-01"
                    },
                    "to": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "example": "2026-11-01"
                    },
                    "time_zone": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "ready",
                        "failed"
                      ]
                    },
                    "row_count": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sha256": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ready_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "download_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "download_expires_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "kind",
                    "currency",
                    "from",
                    "to",
                    "time_zone",
                    "status",
                    "row_count",
                    "sha256",
                    "error",
                    "created_at",
                    "ready_at",
                    "download_url",
                    "download_expires_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Service status: the API, webhooks and each rail (fed by the watchdog)",
        "tags": [
          "Utilities"
        ],
        "x-np-scope": null,
        "security": [],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "status"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "operational",
                        "degraded",
                        "outage",
                        "unknown"
                      ]
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "components": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "api",
                              "webhooks",
                              "checkout",
                              "desk_upi",
                              "desk_bank",
                              "gateway",
                              "usdt_trc20",
                              "usdt_bep20"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "operational",
                              "degraded",
                              "outage",
                              "unknown"
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "status",
                    "updated_at",
                    "components"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "operationId": "statusPage",
        "summary": "The status page for people (HTML)",
        "tags": [
          "Utilities"
        ],
        "x-np-scope": null,
        "security": [],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/html": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/webhook-keys.json": {
      "get": {
        "operationId": "webhookKeys",
        "summary": "Public keys that sign webhooks (JWKS)",
        "tags": [
          "Webhooks"
        ],
        "x-np-scope": null,
        "security": [],
        "parameters": [
          {
            "name": "NP-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-12-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kty": {
                            "type": "string",
                            "const": "OKP"
                          },
                          "crv": {
                            "type": "string",
                            "const": "Ed25519"
                          },
                          "alg": {
                            "type": "string",
                            "const": "EdDSA"
                          },
                          "use": {
                            "type": "string",
                            "const": "sig"
                          },
                          "kid": {
                            "type": "string"
                          },
                          "x": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kty",
                          "crv",
                          "alg",
                          "use",
                          "kid",
                          "x"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "keys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "NP1": {
        "type": "apiKey",
        "in": "header",
        "name": "NP-Signature",
        "description": "NP1 request signature; see the authentication guide."
      }
    },
    "schemas": {
      "Problem": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "limit": {
            "description": "With `limit_exceeded`: which limit refused the request — the customer's gap between two pay-ins (`customer_gap`), open pay-ins (`customer_open`), open pay-ins without a reference (`customer_unreferenced`), pay-ins today (`customer_daily`) or in the last hour (`customer_hourly`); the project's enabled webhook endpoints (`webhook_endpoints`); the merchant's overdraft ceiling (`overdraft_ceiling`); the largest amount of one pay-in or payout (`amount_max`, with `min_amount` and `max_amount`). New values may be added.",
            "type": "string",
            "enum": [
              "customer_gap",
              "customer_open",
              "customer_unreferenced",
              "customer_daily",
              "customer_hourly",
              "webhook_endpoints",
              "overdraft_ceiling",
              "amount_max"
            ]
          },
          "limit_max": {
            "description": "With a count limit: how many it allows.",
            "example": 2,
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "retry_after_seconds": {
            "description": "With `customer_gap`: the seconds until this customer may ask again.",
            "example": 47,
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "min_amount": {
            "description": "With `amount_too_small` or `limit_exceeded` (`amount_max`) for an amount outside your per-payment limits: the smallest amount you may ask for, in the request's currency.",
            "example": "300.00",
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
          },
          "max_amount": {
            "description": "With the same answers: the largest amount you may ask for.",
            "example": "20000.00",
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$"
          },
          "switched_off": {
            "description": "With `method_not_available` when Nice Pay has switched the currency off for you: `fiat` (INR) or `crypto` (USDT).",
            "type": "string",
            "enum": [
              "fiat",
              "crypto"
            ]
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "request_id"
        ],
        "additionalProperties": false
      }
    },
    "x-np-error-codes": {
      "missing_credentials": {
        "status": 401,
        "title": "Missing credentials"
      },
      "invalid_key": {
        "status": 401,
        "title": "Invalid key"
      },
      "invalid_signature": {
        "status": 401,
        "title": "Invalid signature"
      },
      "timestamp_out_of_range": {
        "status": 401,
        "title": "Timestamp out of range"
      },
      "nonce_reused": {
        "status": 401,
        "title": "Nonce reused"
      },
      "ip_not_allowed": {
        "status": 403,
        "title": "IP address not allowed"
      },
      "edge_auth_failed": {
        "status": 403,
        "title": "Forbidden"
      },
      "insufficient_scope": {
        "status": 403,
        "title": "Insufficient scope"
      },
      "test_mode_only": {
        "status": 403,
        "title": "Test mode only"
      },
      "merchant_not_active": {
        "status": 403,
        "title": "Merchant not active"
      },
      "invalid_request": {
        "status": 400,
        "title": "Invalid request"
      },
      "amount_too_small": {
        "status": 422,
        "title": "Amount too small"
      },
      "invalid_destination": {
        "status": 422,
        "title": "Invalid destination"
      },
      "unsupported_version": {
        "status": 400,
        "title": "Unsupported API version"
      },
      "idempotency_key_required": {
        "status": 400,
        "title": "Idempotency key required"
      },
      "idempotency_key_reused": {
        "status": 409,
        "title": "Idempotency key reused"
      },
      "request_in_progress": {
        "status": 409,
        "title": "Request in progress"
      },
      "duplicate_merchant_reference": {
        "status": 409,
        "title": "Duplicate merchant reference"
      },
      "reference_already_used": {
        "status": 409,
        "title": "Reference already used"
      },
      "not_found": {
        "status": 404,
        "title": "Not found"
      },
      "invalid_state": {
        "status": 409,
        "title": "Invalid state"
      },
      "payout_in_progress": {
        "status": 409,
        "title": "Payout in progress"
      },
      "imported_record": {
        "status": 409,
        "title": "Imported record"
      },
      "gone": {
        "status": 410,
        "title": "Gone"
      },
      "outside_working_hours": {
        "status": 409,
        "title": "Outside working hours"
      },
      "limit_exceeded": {
        "status": 403,
        "title": "Limit exceeded"
      },
      "insufficient_balance": {
        "status": 402,
        "title": "Insufficient balance"
      },
      "rail_unavailable": {
        "status": 503,
        "title": "No rail available"
      },
      "address_pool_empty": {
        "status": 503,
        "title": "No address ready; retry shortly"
      },
      "invoice_already_open": {
        "status": 409,
        "title": "An invoice is already open on this address"
      },
      "method_not_available": {
        "status": 422,
        "title": "Method not available"
      },
      "rate_limited": {
        "status": 429,
        "title": "Too many requests"
      },
      "internal_error": {
        "status": 500,
        "title": "Internal error"
      },
      "service_unavailable": {
        "status": 503,
        "title": "Service unavailable"
      }
    }
  }
}
