{
  "openapi": "3.1.0",
  "info": {
    "title": "QuickPay API",
    "version": "1",
    "description": "Create checkouts, read payments and your balance, and request withdrawals. Guides: https://quickpayph.com/docs/. Amounts are integers in centavos, in whole pesos. Test keys (`qp_test_…`) see only test objects; live keys (`qp_live_…`) only live ones."
  },
  "servers": [
    {
      "url": "https://quickpayph.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Checkouts"
    },
    {
      "name": "Balance"
    },
    {
      "name": "Withdrawals"
    }
  ],
  "paths": {
    "/api/v1/checkouts": {
      "post": {
        "operationId": "createCheckout",
        "tags": [
          "Checkouts"
        ],
        "summary": "Create a checkout",
        "description": "Scope `checkouts`. Creates a checkout with a hosted payment page at `url`. The fee (1% of the amount, ₱5 minimum) comes out of the amount.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "1 to 255 characters, unique per order or payout. The same key and body again answer the first result with 200 and `Idempotent-Replayed: true`.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutCreate"
              },
              "example": {
                "amount": 150000,
                "reference": "order-1001",
                "description": "2 x T-shirt",
                "success_url": "https://shop.example/thanks",
                "cancel_url": "https://shop.example/cart",
                "metadata": {
                  "order_id": "1001"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An idempotent replay: the checkout the first call made.",
            "headers": {
              "Idempotent-Replayed": {
                "description": "`true` when this answers an earlier call with the same key.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `idempotency_key_required`, `invalid_json`, `invalid_input`, `amount_required`, `amount_too_small`, `amount_too_large`, `channel_not_offered`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error` is one of: `idempotency_mismatch`, `in_progress`, `too_many_attempts`, `daily_received_limit`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "description": "Error. `error` is one of: `amount_mismatch`, `no_qr`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error. `error` is one of: `gateway_unavailable`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listCheckouts",
        "tags": [
          "Checkouts"
        ],
        "summary": "List checkouts",
        "description": "Scope `read`. Newest first; includes the checkouts your payment links made (live keys).",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "paid",
                "expired"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "The last id you got: answers the ones older than it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutList"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `invalid_input`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/checkouts/{id}": {
      "get": {
        "operationId": "getCheckout",
        "tags": [
          "Checkouts"
        ],
        "summary": "Read a checkout",
        "description": "Scope `read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error` is one of: `not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/checkouts/{id}/simulate": {
      "post": {
        "operationId": "simulateCheckout",
        "tags": [
          "Checkouts"
        ],
        "summary": "Simulate a test payment",
        "description": "Scope `checkouts`, test keys only. Settles the checkout's payment as `paid` or `failed`; the same webhooks as for a real payment are sent with `livemode: false`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "result"
                ],
                "properties": {
                  "result": {
                    "type": "string",
                    "enum": [
                      "paid",
                      "failed"
                    ]
                  }
                }
              },
              "example": {
                "result": "paid"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `invalid_json`, `invalid_input`, `amount_required`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error` is one of: `not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Error. `error` is one of: `checkout_closed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/balance": {
      "get": {
        "operationId": "getBalance",
        "tags": [
          "Balance"
        ],
        "summary": "Read your balance",
        "description": "Scope `read`. A test key always answers zeros.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/payout-accounts": {
      "get": {
        "operationId": "listPayoutAccounts",
        "tags": [
          "Balance"
        ],
        "summary": "List payout accounts",
        "description": "Scope `read`. Your saved bank and e-wallet accounts, masked. They are changed only in the dashboard.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PayoutAccount"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/withdrawals": {
      "post": {
        "operationId": "createWithdrawal",
        "tags": [
          "Withdrawals"
        ],
        "summary": "Request a withdrawal",
        "description": "Scope `withdraw`. Holds the amount from your available balance and sends it, less the fee, to the payout account.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "1 to 255 characters, unique per order or payout. The same key and body again answer the first result with 200 and `Idempotent-Replayed: true`.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawalCreate"
              },
              "example": {
                "amount": 100000,
                "payout_account_id": "pa_2H7W4N9K1Q6X3M8V5T0CRJZP"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An idempotent replay: the withdrawal the first call made.",
            "headers": {
              "Idempotent-Replayed": {
                "description": "`true` when this answers an earlier call with the same key.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `idempotency_key_required`, `invalid_json`, `invalid_input`, `amount_not_whole_pesos`, `amount_too_small`, `amount_too_large`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error` is one of: `payout_account_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error` is one of: `idempotency_mismatch`, `insufficient_balance`, `monthly_limit_exceeded`, `daily_limit`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "get": {
        "operationId": "listWithdrawals",
        "tags": [
          "Withdrawals"
        ],
        "summary": "List withdrawals",
        "description": "Scope `read`. Newest first.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "paid",
                "failed",
                "rejected"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "The last id you got: answers the ones older than it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawalList"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `invalid_input`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/withdrawals/limits": {
      "get": {
        "operationId": "getWithdrawalLimits",
        "tags": [
          "Withdrawals"
        ],
        "summary": "Read your withdrawal limits",
        "description": "Scope `read`. A test key sees `available` and `max_withdrawable` as zero.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawalLimits"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/withdrawals/{id}": {
      "get": {
        "operationId": "getWithdrawal",
        "tags": [
          "Withdrawals"
        ],
        "summary": "Read a withdrawal",
        "description": "Scope `read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error` is one of: `not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/withdrawals/{id}/simulate": {
      "post": {
        "operationId": "simulateWithdrawal",
        "tags": [
          "Withdrawals"
        ],
        "summary": "Simulate a test withdrawal",
        "description": "Scope `withdraw`, test keys only. Finishes the withdrawal as `paid` or `failed`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "result"
                ],
                "properties": {
                  "result": {
                    "type": "string",
                    "enum": [
                      "paid",
                      "failed"
                    ]
                  }
                }
              },
              "example": {
                "result": "paid"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "Error. `error` is one of: `invalid_json`, `invalid_input`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Error. `error` is one of: `insufficient_scope`, `ip_not_allowed`, `account_not_active`, `test_mode_only`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error. `error` is one of: `not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error. `error` is one of: `invalid_state`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Developers → API keys: `qp_test_…` or `qp_live_…`."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "No key, or an unknown or revoked one (`invalid_api_key`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests for this key (`rate_limited`); 120 a minute by default.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A stable code for your program."
          },
          "message": {
            "type": "string",
            "description": "Plain English for people; may change."
          }
        },
        "example": {
          "error": "amount_too_small",
          "message": "The minimum amount is ₱100.00."
        }
      },
      "CheckoutCreate": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "multipleOf": 100,
            "description": "Centavos, in whole pesos. ₱100 to ₱50,000 by default (your account may differ), and more than the fee."
          },
          "reference": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Shown to the payer."
          },
          "collect": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "name",
                "mobile",
                "email"
              ]
            }
          },
          "success_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "Absolute https URL."
          },
          "cancel_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "Absolute https URL."
          },
          "expires_in_minutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 10080,
            "default": 60
          },
          "metadata": {
            "type": "object",
            "maxProperties": 20,
            "propertyNames": {
              "minLength": 1,
              "maxLength": 40
            },
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            }
          },
          "channel": {
            "type": "string",
            "description": "Start a payment on this channel and return its QR.",
            "examples": [
              "gcash",
              "maya",
              "gotyme",
              "grabpay",
              "shopeepay",
              "banks",
              "qrph"
            ]
          }
        }
      },
      "Checkout": {
        "type": "object",
        "required": [
          "id",
          "object",
          "livemode",
          "status",
          "amount",
          "fee",
          "net_amount",
          "currency",
          "url",
          "expires_at",
          "paid_at",
          "source",
          "created_at",
          "metadata",
          "payer"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "cs_8Q2M4X7RJK1V9TNC3H6PWZ5D"
            ]
          },
          "object": {
            "const": "checkout"
          },
          "livemode": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "paid",
              "expired"
            ]
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "What the payer pays. In centavos; null until the amount is set."
          },
          "amount_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "fee": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1% of the amount, ₱5 minimum. In centavos; null until the amount is set."
          },
          "fee_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "net_amount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "amount − fee: what your balance gets. In centavos; null until the amount is set."
          },
          "net_amount_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "currency": {
            "const": "PHP"
          },
          "reference": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The hosted payment page; may be on your own checkout domain."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "enum": ["api", "link", "pos"],
            "description": "How the checkout was made: api, a checkout link, or the dashboard's New Sale (POS) screen."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "payer": {
            "type": "object",
            "description": "The details asked for with `collect`.",
            "properties": {
              "name": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "qr": {
            "type": "object",
            "description": "Only when the create call named a `channel`.",
            "properties": {
              "channel": {
                "type": "string"
              },
              "emv": {
                "type": "string",
                "description": "The QR payload."
              },
              "image": {
                "type": "string",
                "description": "The QR code as an image."
              },
              "deeplink": {
                "type": "string"
              }
            }
          }
        }
      },
      "CheckoutList": {
        "type": "object",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Checkout"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "Balance": {
        "type": "object",
        "required": [
          "available",
          "pending_withdrawal"
        ],
        "properties": {
          "available": {
            "type": "integer",
            "description": "What you can withdraw. In centavos.",
            "examples": [
              150000
            ]
          },
          "available_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "pending_withdrawal": {
            "type": "integer",
            "description": "Held for unfinished withdrawals. In centavos.",
            "examples": [
              150000
            ]
          },
          "pending_withdrawal_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          }
        }
      },
      "PayoutAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "pa_2H7W4N9K1Q6X3M8V5T0CRJZP"
            ]
          },
          "object": {
            "const": "payout_account"
          },
          "label": {
            "type": "string"
          },
          "bank_id": {
            "type": "integer"
          },
          "bank_name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "gcash",
              "bank"
            ]
          },
          "account_name": {
            "type": "string"
          },
          "account_number_masked": {
            "type": "string",
            "examples": [
              "*******1234"
            ]
          },
          "contact_mobile_masked": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WithdrawalCreate": {
        "type": "object",
        "required": [
          "amount",
          "payout_account_id"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "multipleOf": 100,
            "description": "Centavos, in whole pesos. ₱115 to ₱50,000 by default. When you bear the ₱15 fee (the default), it comes out of this amount."
          },
          "payout_account_id": {
            "type": "string"
          }
        }
      },
      "Withdrawal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "wd_6M3K9Q2X7V1T8N4C5R0JHPWZ"
            ]
          },
          "object": {
            "const": "withdrawal"
          },
          "livemode": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "paid",
              "failed",
              "rejected"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Taken from your balance. In centavos.",
            "examples": [
              150000
            ]
          },
          "amount_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "fee": {
            "type": "integer",
            "description": "The withdrawal fee. In centavos.",
            "examples": [
              1500
            ]
          },
          "fee_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱15.00\"."
          },
          "net_amount": {
            "type": "integer",
            "description": "What arrives. In centavos.",
            "examples": [
              148500
            ]
          },
          "net_amount_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,485.00\"."
          },
          "currency": {
            "const": "PHP"
          },
          "destination": {
            "type": "object",
            "properties": {
              "payout_account_id": {
                "type": "string"
              },
              "bank_id": {
                "type": "integer"
              },
              "bank_name": {
                "type": "string"
              },
              "account_name": {
                "type": "string"
              },
              "account_number_masked": {
                "type": "string"
              }
            }
          },
          "payout_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set only for a bank transfer made by QuickPay staff."
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "automatic": {
            "type": "boolean",
            "description": "True once the payout has reached the payout portal without staff review. False until then, for withdrawals staff reviewed, and when the portal never received it."
          }
        }
      },
      "WithdrawalList": {
        "type": "object",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Withdrawal"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "WithdrawalLimits": {
        "type": "object",
        "properties": {
          "min_amount": {
            "type": "integer",
            "description": "Centavos."
          },
          "min_amount_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "max_per_tx": {
            "type": "integer",
            "description": "Centavos."
          },
          "max_per_tx_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "max_per_month": {
            "type": "integer",
            "description": "Centavos."
          },
          "max_per_month_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "used_this_month": {
            "type": "integer",
            "description": "Centavos."
          },
          "used_this_month_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "left_this_month": {
            "type": "integer",
            "description": "Centavos."
          },
          "left_this_month_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "fee": {
            "type": "integer",
            "description": "Centavos."
          },
          "fee_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "fee_rate_bp": {
            "type": "integer",
            "description": "The account's withdrawal fee rate in basis points, 0 when the account pays the flat fee. The fee for an amount is this share of it, rounded to the nearest peso, but never less than `fee`."
          },
          "fee_rate_display": {
            "type": "string",
            "description": "The rate for people, such as \"0.8%\". Empty when the rate is 0."
          },
          "available": {
            "type": "integer",
            "description": "Centavos."
          },
          "available_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "max_withdrawable": {
            "type": "integer",
            "description": "Centavos."
          },
          "max_withdrawable_display": {
            "type": "string",
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "daily_max": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Centavos; null when your account has no daily limit."
          },
          "daily_max_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "daily_used": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Centavos; null when your account has no daily limit."
          },
          "daily_used_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "daily_left": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Centavos; null when your account has no daily limit."
          },
          "daily_left_display": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount for people, such as \"₱1,500.00\"."
          },
          "automatic": {
            "type": "object",
            "description": "Whether new withdrawals are sent without staff review. Test keys see the same object.",
            "properties": {
              "approved": {
                "type": "boolean",
                "description": "QuickPay staff approved your account for automatic withdrawals."
              },
              "active": {
                "type": "boolean",
                "description": "True when a withdrawal up to max is sent without review right now."
              },
              "inactive_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "not_approved",
                  "paused",
                  "needs_2fa",
                  null
                ],
                "description": "Why active is false, checked in this order: not_approved, paused (QuickPay paused automatic withdrawals), needs_2fa (a member of your account has two-factor sign-in off). Null when active."
              },
              "max": {
                "type": "integer",
                "description": "The largest withdrawal sent without review, in centavos."
              },
              "max_display": {
                "type": "string",
                "description": "The amount for people, such as \"₱10,000.00\"."
              }
            }
          }
        }
      }
    }
  }
}
