{
  "openapi": "3.0.3",
  "info": {
    "title": "WunaPay API",
    "version": "0.9.15",
    "description": "MTN MoMo and Orange Money payments in Cameroon (XAF). Test keys (sk_test_) never move real money. Docs: https://wunapay.com/docs.html"
  },
  "servers": [
    {
      "url": "https://app.wunapay.com"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your secret key: sk_test_… or sk_live_…"
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "description": "Any unique text. The same key with the same body returns the first answer (24 h) instead of doing it twice."
      }
    },
    "responses": {
      "Error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                },
                "details": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/wallet/app/subscriptions": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/subscriptions",
        "operationId": "get_wallet_app_subscriptions",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/subscriptions/{id}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/subscriptions/{id}",
        "operationId": "get_wallet_app_subscriptions_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/subscriptions/{id}/pay": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/subscriptions/{id}/pay",
        "operationId": "post_wallet_app_subscriptions_id_pay",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/subscriptions/{id}/autopay": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/subscriptions/{id}/autopay",
        "operationId": "post_wallet_app_subscriptions_id_autopay",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/subscriptions/{id}/cancel",
        "operationId": "post_wallet_app_subscriptions_id_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/plans": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/plans",
        "operationId": "post_plans",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Other"
        ],
        "summary": "GET /v1/plans",
        "operationId": "get_plans",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/plans/{id}": {
      "get": {
        "tags": [
          "Other"
        ],
        "summary": "GET /v1/plans/{id}",
        "operationId": "get_plans_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/plans/{id}",
        "operationId": "post_plans_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/plans/{id}/archive": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/plans/{id}/archive",
        "operationId": "post_plans_id_archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions",
        "operationId": "post_subscriptions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Other"
        ],
        "summary": "GET /v1/subscriptions",
        "operationId": "get_subscriptions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/subscriptions/import": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/import",
        "operationId": "post_subscriptions_import",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}": {
      "get": {
        "tags": [
          "Other"
        ],
        "summary": "GET /v1/subscriptions/{id}",
        "operationId": "get_subscriptions_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}",
        "operationId": "post_subscriptions_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}/pause": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}/pause",
        "operationId": "post_subscriptions_id_pause",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}/resume": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}/resume",
        "operationId": "post_subscriptions_id_resume",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}/cancel",
        "operationId": "post_subscriptions_id_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}/collect": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}/collect",
        "operationId": "post_subscriptions_id_collect",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions/{id}/cash": {
      "post": {
        "tags": [
          "Other"
        ],
        "summary": "POST /v1/subscriptions/{id}/cash",
        "operationId": "post_subscriptions_id_cash",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Wallet summary of the connected person.",
        "operationId": "get_wallet",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/history": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Wallet history (limit, before).",
        "operationId": "get_wallet_history",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/entries/{id}": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "One wallet entry.",
        "operationId": "get_wallet_entries_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/topup": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Top up the wallet from Mobile Money.",
        "operationId": "post_wallet_topup",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/withdraw": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Withdraw to Mobile Money (PIN).",
        "operationId": "post_wallet_withdraw",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/send": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Send money to another wallet (PIN).",
        "operationId": "post_wallet_send",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/pay": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Pay this business from the wallet (PIN).",
        "operationId": "post_wallet_pay",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/me": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/me",
        "operationId": "get_wallet_app_me",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/requests": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/requests",
        "operationId": "get_wallet_app_requests",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/requests/{id}/pay": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/requests/{id}/pay",
        "operationId": "post_wallet_app_requests_id_pay",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/stats": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/stats",
        "operationId": "get_wallet_app_stats",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/business": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/business",
        "operationId": "get_wallet_app_business",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/business/history": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/business/history",
        "operationId": "get_wallet_app_business_history",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/business/entries/{id}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/business/entries/{id}",
        "operationId": "get_wallet_app_business_entries_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/business/move": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/business/move",
        "operationId": "post_wallet_app_business_move",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/business/topup": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/business/topup",
        "operationId": "post_wallet_app_business_topup",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/business/withdraw": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/business/withdraw",
        "operationId": "post_wallet_app_business_withdraw",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/till/{id}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/till/{id}",
        "operationId": "get_wallet_app_till_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/pay-business/{code}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/pay-business/{code}",
        "operationId": "get_wallet_app_pay_business_code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/pay-business": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/pay-business",
        "operationId": "post_wallet_app_pay_business",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/history": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/history",
        "operationId": "get_wallet_app_history",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/entries/{id}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/entries/{id}",
        "operationId": "get_wallet_app_entries_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/topup": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/topup",
        "operationId": "post_wallet_app_topup",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/lookup": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/lookup",
        "operationId": "get_wallet_app_lookup",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/app/send": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/send",
        "operationId": "post_wallet_app_send",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/withdraw": {
      "post": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "POST /v1/wallet/app/withdraw",
        "operationId": "post_wallet_app_withdraw",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/app/business-qr/{id}": {
      "get": {
        "tags": [
          "Wallet app (partners)"
        ],
        "summary": "GET /v1/wallet/app/business-qr/{id}",
        "operationId": "get_wallet_app_business_qr_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agents/cities": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agents/cities",
        "operationId": "get_wallet_agents_cities",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agents/fees": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agents/fees",
        "operationId": "get_wallet_agents_fees",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agents": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agents",
        "operationId": "get_wallet_agents",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agents/cash-outs": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agents/cash-outs",
        "operationId": "get_wallet_agents_cash_outs",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agents/cash-outs/{id}/cancel": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agents/cash-outs/{id}/cancel",
        "operationId": "post_wallet_agents_cash_outs_id_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agents/cash-out": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agents/cash-out",
        "operationId": "post_wallet_agents_cash_out",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agents/confirmations": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agents/confirmations",
        "operationId": "post_wallet_agents_confirmations",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agents/{code}": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agents/{code}",
        "operationId": "get_wallet_agents_code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agent": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agent",
        "operationId": "get_wallet_agent",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agent/apply": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/apply",
        "operationId": "post_wallet_agent_apply",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/update": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/update",
        "operationId": "post_wallet_agent_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/cash-in/preview": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/cash-in/preview",
        "operationId": "post_wallet_agent_cash_in_preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/cash-in": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/cash-in",
        "operationId": "post_wallet_agent_cash_in",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/cash-out/check": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/cash-out/check",
        "operationId": "post_wallet_agent_cash_out_check",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/cash-out/confirm": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/agent/cash-out/confirm",
        "operationId": "post_wallet_agent_cash_out_confirm",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/agent/operations": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agent/operations",
        "operationId": "get_wallet_agent_operations",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/agent/statement": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/agent/statement",
        "operationId": "get_wallet_agent_statement",
        "parameters": [
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "tags": [
          "Balance"
        ],
        "summary": "Available balance of the key's mode (test or real money).",
        "operationId": "get_balance",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/payments": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Ask a customer to pay (Mobile Money prompt on their phone).",
        "operationId": "post_payments",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "method",
                  "phone"
                ],
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "method": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "customer_name": {
                    "type": "string"
                  },
                  "customer_email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "List payments, newest first (status, reference, before, limit).",
        "operationId": "get_payments",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/payments/{id}/cancel": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Stop waiting for a pending payment. A late approval still makes it succeeded.",
        "operationId": "post_payments_id_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Retrieve one payment (asks the operator if it is still pending).",
        "operationId": "get_payments_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/refunds": {
      "post": {
        "tags": [
          "Refunds"
        ],
        "summary": "Refund a payment (all or part) to the number that paid.",
        "operationId": "post_refunds",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment"
                ],
                "properties": {
                  "payment": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Refunds"
        ],
        "summary": "List refunds, newest first (payment, status, before, limit).",
        "operationId": "get_refunds",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/refunds/{id}": {
      "get": {
        "tags": [
          "Refunds"
        ],
        "summary": "Retrieve one refund.",
        "operationId": "get_refunds_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Events (same as webhooks): since=<id> oldest first, or newest first with before=<id>.",
        "operationId": "get_events",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/name-enquiry": {
      "get": {
        "tags": [
          "Payouts"
        ],
        "summary": "Who owns a Mobile Money number (phone, method, expected_name).",
        "operationId": "get_name_enquiry",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/payouts": {
      "post": {
        "tags": [
          "Payouts"
        ],
        "summary": "Send money to a Mobile Money number. Real money needs an IP allow-list.",
        "operationId": "post_payouts",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "method",
                  "phone"
                ],
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "method": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "expected_name": {
                    "type": "string"
                  },
                  "name_check": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Payouts"
        ],
        "summary": "List payouts, withdrawals and refunds, newest first (status, kind, reference, before, limit).",
        "operationId": "get_payouts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/payouts/{id}": {
      "get": {
        "tags": [
          "Payouts"
        ],
        "summary": "Retrieve one payout.",
        "operationId": "get_payouts_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/checkout/sessions": {
      "post": {
        "tags": [
          "Checkout"
        ],
        "summary": "Create a hosted checkout page.",
        "operationId": "post_checkout_sessions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "return_url"
                ],
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "return_url": {
                    "type": "string"
                  },
                  "cancel_url": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "escrow": {
                    "type": "object"
                  },
                  "splits": {
                    "type": "array"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/checkout/sessions/{id}": {
      "get": {
        "tags": [
          "Checkout"
        ],
        "summary": "Retrieve a checkout session and its payment.",
        "operationId": "get_checkout_sessions_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/escrows/{id}": {
      "get": {
        "tags": [
          "Escrow"
        ],
        "summary": "Retrieve a protected payment.",
        "operationId": "get_escrows_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/escrows/{id}/confirm": {
      "post": {
        "tags": [
          "Escrow"
        ],
        "summary": "Partner apps: the buyer confirmed delivery; release the money.",
        "operationId": "post_escrows_id_confirm",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/escrows/{id}/cancel": {
      "post": {
        "tags": [
          "Escrow"
        ],
        "summary": "Cancel before delivery: full refund to the buyer.",
        "operationId": "post_escrows_id_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/escrows/{id}/deliver": {
      "post": {
        "tags": [
          "Escrow"
        ],
        "summary": "Mark as delivered (starts the release countdown).",
        "operationId": "post_escrows_id_deliver",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallet/links": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Start connecting a person's WunaPay wallet (SMS code).",
        "operationId": "post_wallet_links",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/links/confirm": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Finish connecting (code + PIN): returns the link token.",
        "operationId": "post_wallet_links_confirm",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/unlink": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "Disconnect the wallet.",
        "operationId": "post_wallet_unlink",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/confirmations": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/confirmations",
        "operationId": "post_wallet_confirmations",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/v1/wallet/confirmations/{id}": {
      "get": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "GET /v1/wallet/confirmations/{id}",
        "operationId": "get_wallet_confirmations_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/wallet/confirmations/{id}/code": {
      "post": {
        "tags": [
          "Wallet (partners)"
        ],
        "summary": "POST /v1/wallet/confirmations/{id}/code",
        "operationId": "post_wallet_confirmations_id_code",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "WunaPay-Wallet",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Link token of the connected wallet"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    }
  }
}
