{
  "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}$"
                      },
                      "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": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400
                  },
                  "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"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {}
                    },
                    "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"
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time"
                        ],
                        "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
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "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",
                    "expires_at",
                    "created_at",
                    "metadata"
                  ],
                  "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": "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"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          },
                          "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"
                                }
                              },
                              "required": [
                                "tx_hash",
                                "log_index",
                                "amount",
                                "status",
                                "block_time"
                              ],
                              "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
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "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",
                          "expires_at",
                          "created_at",
                          "metadata"
                        ],
                        "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"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {}
                    },
                    "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"
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time"
                        ],
                        "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
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "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",
                    "expires_at",
                    "created_at",
                    "metadata"
                  ],
                  "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"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {}
                    },
                    "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"
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time"
                        ],
                        "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
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "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",
                    "expires_at",
                    "created_at",
                    "metadata"
                  ],
                  "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"
                          ]
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": {}
                    },
                    "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"
                          }
                        },
                        "required": [
                          "tx_hash",
                          "log_index",
                          "amount",
                          "status",
                          "block_time"
                        ],
                        "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
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "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",
                    "expires_at",
                    "created_at",
                    "metadata"
                  ],
                  "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}$"
                      }
                    },
                    "required": [
                      "ref"
                    ],
                    "additionalProperties": false
                  },
                  "risk_hints": {
                    "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
                  },
                  "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": {
                      "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"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "under_review": {
                      "type": "boolean"
                    },
                    "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"
                      ]
                    },
                    "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"
                        }
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata"
                  ],
                  "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": "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": {
                            "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"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "processing",
                              "sent",
                              "succeeded",
                              "failed",
                              "cancelled",
                              "reversed"
                            ]
                          },
                          "under_review": {
                            "type": "boolean"
                          },
                          "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"
                            ]
                          },
                          "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"
                              }
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "merchant_payout_id",
                          "amount",
                          "fee",
                          "currency",
                          "status",
                          "under_review",
                          "method",
                          "destination",
                          "reference",
                          "customer",
                          "created_at",
                          "completed_at",
                          "metadata"
                        ],
                        "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": {
                      "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"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "under_review": {
                      "type": "boolean"
                    },
                    "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"
                      ]
                    },
                    "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"
                        }
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payouts/{id}/cancel": {
      "post": {
        "operationId": "cancelPayout",
        "summary": "Cancel a queued payout",
        "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": {
                      "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"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "sent",
                        "succeeded",
                        "failed",
                        "cancelled",
                        "reversed"
                      ]
                    },
                    "under_review": {
                      "type": "boolean"
                    },
                    "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"
                      ]
                    },
                    "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"
                        }
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "merchant_payout_id",
                    "amount",
                    "fee",
                    "currency",
                    "status",
                    "under_review",
                    "method",
                    "destination",
                    "reference",
                    "customer",
                    "created_at",
                    "completed_at",
                    "metadata"
                  ],
                  "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"
                            ]
                          },
                          "available": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "pending": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "reserved": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00"
                          },
                          "held": {
                            "type": "string",
                            "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,6})?$",
                            "example": "10000.00",
                            "description": "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."
                          }
                        },
                        "required": [
                          "currency",
                          "available",
                          "pending",
                          "reserved",
                          "held",
                          "holds"
                        ],
                        "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/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"
                          },
                          "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"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "bps",
                                  "fixed",
                                  "min",
                                  "max"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "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/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
                  }
                },
                "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": "The informational USDT/INR rate",
        "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"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "reference_rate"
                          },
                          "base": {
                            "type": "string",
                            "const": "USDT"
                          },
                          "quote": {
                            "type": "string",
                            "const": "INR"
                          },
                          "rate": {
                            "type": "string",
                            "pattern": "^[0-9]{1,6}(\\.[0-9]{1,8})?$"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "informational": {
                            "type": "boolean",
                            "const": true
                          }
                        },
                        "required": [
                          "object",
                          "base",
                          "quote",
                          "rate",
                          "source",
                          "updated_at",
                          "informational"
                        ],
                        "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": {
      "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"
                  ]
                },
                {
                  "maxItems": 24,
                  "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"
                    ]
                  }
                }
              ]
            }
          },
          {
            "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"
                            ]
                          },
                          "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"
                      ]
                    },
                    "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"
                              ]
                            }
                          },
                          "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": 24,
                    "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"
                      ]
                    }
                  },
                  "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"
                        ]
                      }
                    },
                    "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"
                        ]
                      }
                    },
                    "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": 24,
                    "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"
                      ]
                    }
                  },
                  "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"
                        ]
                      }
                    },
                    "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": 24,
                    "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"
                      ]
                    }
                  }
                },
                "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
            }
          }
        },
        "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"
      },
      "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"
      }
    }
  }
}
