{
  "openapi": "3.1.0",
  "info": {
    "title": "RespireSoft Invoicing API",
    "version": "2026-11-01",
    "description": "Invoices, payments and webhooks. See https://invoicing.respiresoft.com/docs/api for the guides."
  },
  "servers": [
    {
      "url": "https://api.invoicing.respiresoft.com/v1"
    }
  ],
  "paths": {
    "/customers": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "List customers",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_customers",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "customers:read",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Create customer",
        "description": "",
        "operationId": "post_customers",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "customers:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name."
                  },
                  "kind": {
                    "type": "string",
                    "description": "person or company."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Up to 10 email addresses."
                  },
                  "phone": {
                    "type": "string",
                    "description": ""
                  },
                  "country": {
                    "type": "string",
                    "description": "Two letter country code."
                  },
                  "tax_ids": {
                    "type": "array",
                    "description": "Rows of {type, number, country?}."
                  },
                  "currency": {
                    "type": "string",
                    "description": "Default currency."
                  },
                  "payment_terms_days": {
                    "type": "integer",
                    "description": "0 to 365."
                  },
                  "code": {
                    "type": "string",
                    "description": "Your own short reference."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/customers/{id}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieve customer",
        "description": "",
        "operationId": "get_customers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "customers:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Update customer",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_customers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "customers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name."
                  },
                  "kind": {
                    "type": "string",
                    "description": "person or company."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Up to 10 email addresses."
                  },
                  "phone": {
                    "type": "string",
                    "description": ""
                  },
                  "country": {
                    "type": "string",
                    "description": "Two letter country code."
                  },
                  "tax_ids": {
                    "type": "array",
                    "description": "Rows of {type, number, country?}."
                  },
                  "currency": {
                    "type": "string",
                    "description": "Default currency."
                  },
                  "payment_terms_days": {
                    "type": "integer",
                    "description": "0 to 365."
                  },
                  "code": {
                    "type": "string",
                    "description": "Your own short reference."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete customer",
        "description": "",
        "operationId": "delete_customers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "customers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "List products",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_products",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Create product",
        "description": "",
        "operationId": "post_products",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "object",
                    "description": "Names per language, en is required: {\"en\": \"Hosting\"}."
                  },
                  "kind": {
                    "type": "string",
                    "description": "Product kind."
                  },
                  "sku": {
                    "type": "string",
                    "description": ""
                  },
                  "unit": {
                    "type": "string",
                    "description": "For example hour or piece."
                  },
                  "tax_rate": {
                    "type": "string",
                    "description": "Id of a tax rate."
                  },
                  "active": {
                    "type": "boolean",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Retrieve product",
        "description": "",
        "operationId": "get_products_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Products"
        ],
        "summary": "Update product",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_products_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "object",
                    "description": "Names per language, en is required: {\"en\": \"Hosting\"}."
                  },
                  "kind": {
                    "type": "string",
                    "description": "Product kind."
                  },
                  "sku": {
                    "type": "string",
                    "description": ""
                  },
                  "unit": {
                    "type": "string",
                    "description": "For example hour or piece."
                  },
                  "tax_rate": {
                    "type": "string",
                    "description": "Id of a tax rate."
                  },
                  "active": {
                    "type": "boolean",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "summary": "Delete product",
        "description": "",
        "operationId": "delete_products_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/prices": {
      "get": {
        "tags": [
          "Prices"
        ],
        "summary": "List prices",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_prices",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Prices"
        ],
        "summary": "Create price",
        "description": "",
        "operationId": "post_prices",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product",
                  "currency"
                ],
                "properties": {
                  "product": {
                    "type": "string",
                    "description": "Product id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "unit_amount": {
                    "type": "integer",
                    "description": "Minor units (1250 is 12.50)."
                  },
                  "type": {
                    "type": "string",
                    "description": "one_time or recurring."
                  },
                  "interval": {
                    "type": "string",
                    "description": "day, week, month or year for recurring prices."
                  },
                  "interval_count": {
                    "type": "integer",
                    "description": "1 to 36."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/prices/{id}": {
      "get": {
        "tags": [
          "Prices"
        ],
        "summary": "Retrieve price",
        "description": "",
        "operationId": "get_prices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Prices"
        ],
        "summary": "Update price",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_prices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "product": {
                    "type": "string",
                    "description": "Product id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "unit_amount": {
                    "type": "integer",
                    "description": "Minor units (1250 is 12.50)."
                  },
                  "type": {
                    "type": "string",
                    "description": "one_time or recurring."
                  },
                  "interval": {
                    "type": "string",
                    "description": "day, week, month or year for recurring prices."
                  },
                  "interval_count": {
                    "type": "integer",
                    "description": "1 to 36."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Prices"
        ],
        "summary": "Delete price",
        "description": "",
        "operationId": "delete_prices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/price_lists": {
      "get": {
        "tags": [
          "Price lists"
        ],
        "summary": "List price lists",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_price_lists",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Price lists"
        ],
        "summary": "Create price list",
        "description": "",
        "operationId": "post_price_lists",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/price_lists/{id}": {
      "get": {
        "tags": [
          "Price lists"
        ],
        "summary": "Retrieve price list",
        "description": "",
        "operationId": "get_price_lists_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Price lists"
        ],
        "summary": "Update price list",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_price_lists_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Price lists"
        ],
        "summary": "Delete price list",
        "description": "",
        "operationId": "delete_price_lists_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/coupons": {
      "get": {
        "tags": [
          "Coupons"
        ],
        "summary": "List coupons",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_coupons",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Coupons"
        ],
        "summary": "Create coupon",
        "description": "",
        "operationId": "post_coupons",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "percent_off_bp": {
                    "type": "integer",
                    "description": "Basis points: 1000 is 10%. Send this or amount_off."
                  },
                  "amount_off": {
                    "type": "integer",
                    "description": "Minor units. Needs currency."
                  },
                  "currency": {
                    "type": "string",
                    "description": ""
                  },
                  "duration": {
                    "type": "string",
                    "description": "once, repeating or forever."
                  },
                  "duration_in_cycles": {
                    "type": "integer",
                    "description": "For repeating."
                  },
                  "max_redemptions": {
                    "type": "integer",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/coupons/{id}": {
      "get": {
        "tags": [
          "Coupons"
        ],
        "summary": "Retrieve coupon",
        "description": "",
        "operationId": "get_coupons_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Coupons"
        ],
        "summary": "Update coupon",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_coupons_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "percent_off_bp": {
                    "type": "integer",
                    "description": "Basis points: 1000 is 10%. Send this or amount_off."
                  },
                  "amount_off": {
                    "type": "integer",
                    "description": "Minor units. Needs currency."
                  },
                  "currency": {
                    "type": "string",
                    "description": ""
                  },
                  "duration": {
                    "type": "string",
                    "description": "once, repeating or forever."
                  },
                  "duration_in_cycles": {
                    "type": "integer",
                    "description": "For repeating."
                  },
                  "max_redemptions": {
                    "type": "integer",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Coupons"
        ],
        "summary": "Delete coupon",
        "description": "",
        "operationId": "delete_coupons_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/promotion_codes": {
      "get": {
        "tags": [
          "Promotion codes"
        ],
        "summary": "List promotion codes",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_promotion_codes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coupon",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Promotion codes"
        ],
        "summary": "Create promotion code",
        "description": "",
        "operationId": "post_promotion_codes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "coupon"
                ],
                "properties": {
                  "coupon": {
                    "type": "string",
                    "description": "Coupon id."
                  },
                  "code": {
                    "type": "string",
                    "description": "The code; made for you when left out."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/promotion_codes/{id}": {
      "get": {
        "tags": [
          "Promotion codes"
        ],
        "summary": "Retrieve promotion code",
        "description": "",
        "operationId": "get_promotion_codes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Promotion codes"
        ],
        "summary": "Update promotion code",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_promotion_codes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "coupon": {
                    "type": "string",
                    "description": "Coupon id."
                  },
                  "code": {
                    "type": "string",
                    "description": "The code; made for you when left out."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Promotion codes"
        ],
        "summary": "Delete promotion code",
        "description": "",
        "operationId": "delete_promotion_codes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/tax_rates": {
      "get": {
        "tags": [
          "Tax rates"
        ],
        "summary": "List tax rates",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_tax_rates",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tax rates"
        ],
        "summary": "Create tax rate",
        "description": "",
        "operationId": "post_tax_rates",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "basis_points"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "basis_points": {
                    "type": "integer",
                    "description": "2100 is 21%."
                  },
                  "country": {
                    "type": "string",
                    "description": ""
                  },
                  "inclusive": {
                    "type": "boolean",
                    "description": "Prices already include it."
                  },
                  "kind": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/tax_rates/{id}": {
      "get": {
        "tags": [
          "Tax rates"
        ],
        "summary": "Retrieve tax rate",
        "description": "",
        "operationId": "get_tax_rates_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Tax rates"
        ],
        "summary": "Update tax rate",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_tax_rates_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "basis_points": {
                    "type": "integer",
                    "description": "2100 is 21%."
                  },
                  "country": {
                    "type": "string",
                    "description": ""
                  },
                  "inclusive": {
                    "type": "boolean",
                    "description": "Prices already include it."
                  },
                  "kind": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tax rates"
        ],
        "summary": "Delete tax rate",
        "description": "",
        "operationId": "delete_tax_rates_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "catalog:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "List quotes",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_quotes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Create quote",
        "description": "",
        "operationId": "post_quotes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currency",
                  "lines"
                ],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": "Customer id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "issue_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "valid_until": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "notes": {
                    "type": "string",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Retrieve quote",
        "description": "",
        "operationId": "get_quotes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Quotes"
        ],
        "summary": "Update quote",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_quotes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": "Customer id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "issue_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "valid_until": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "notes": {
                    "type": "string",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Quotes"
        ],
        "summary": "Delete quote",
        "description": "",
        "operationId": "delete_quotes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/issue": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Issue quote",
        "description": "Gives the draft its number and locks it.",
        "operationId": "post_quotes_id_issue",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/send": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Send quote",
        "description": "Emails the document to the customer.",
        "operationId": "post_quotes_id_send",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/void": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Void quote",
        "description": "Cancels an issued document that has no payments.",
        "operationId": "post_quotes_id_void",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/pdf": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Download the PDF quote",
        "description": "",
        "operationId": "get_quotes_id_pdf",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/pay_link": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Make a pay link quote",
        "description": "Answers with a link to the hosted payment page.",
        "operationId": "post_quotes_id_pay_link",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List invoices",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_invoices",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Create invoice",
        "description": "",
        "operationId": "post_invoices",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currency",
                  "lines"
                ],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": "Customer id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "issue_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "due_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "notes": {
                    "type": "string",
                    "description": ""
                  },
                  "reference": {
                    "type": "string",
                    "description": ""
                  },
                  "discounts": {
                    "type": "object",
                    "description": "{document: {percent_bp | amount}, coupon}."
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Retrieve invoice",
        "description": "",
        "operationId": "get_invoices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Invoices"
        ],
        "summary": "Update invoice",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_invoices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": "Customer id."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "issue_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "due_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "notes": {
                    "type": "string",
                    "description": ""
                  },
                  "reference": {
                    "type": "string",
                    "description": ""
                  },
                  "discounts": {
                    "type": "object",
                    "description": "{document: {percent_bp | amount}, coupon}."
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Delete invoice",
        "description": "",
        "operationId": "delete_invoices_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/issue": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Issue invoice",
        "description": "Gives the draft its number and locks it.",
        "operationId": "post_invoices_id_issue",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/send": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Send invoice",
        "description": "Emails the document to the customer.",
        "operationId": "post_invoices_id_send",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/void": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Void invoice",
        "description": "Cancels an issued document that has no payments.",
        "operationId": "post_invoices_id_void",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/pdf": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Download the PDF invoice",
        "description": "",
        "operationId": "get_invoices_id_pdf",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/pay_link": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Make a pay link invoice",
        "description": "Answers with a link to the hosted payment page.",
        "operationId": "post_invoices_id_pay_link",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes": {
      "get": {
        "tags": [
          "Credit notes"
        ],
        "summary": "List credit notes",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_credit_notes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Create credit note",
        "description": "",
        "operationId": "post_credit_notes",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currency",
                  "lines"
                ],
                "properties": {
                  "parent": {
                    "type": "string",
                    "description": "The invoice it corrects."
                  },
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes/{id}": {
      "get": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Retrieve credit note",
        "description": "",
        "operationId": "get_credit_notes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Update credit note",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_credit_notes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "parent": {
                    "type": "string",
                    "description": "The invoice it corrects."
                  },
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows of the document. Each row: description, quantity, unit_amount (integer minor units), product?, price?, tax_rate?, discount_percent_bp?, discount_amount?."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Delete credit note",
        "description": "",
        "operationId": "delete_credit_notes_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes/{id}/issue": {
      "post": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Issue credit note",
        "description": "Gives the draft its number and locks it.",
        "operationId": "post_credit_notes_id_issue",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes/{id}/send": {
      "post": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Send credit note",
        "description": "Emails the document to the customer.",
        "operationId": "post_credit_notes_id_send",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes/{id}/void": {
      "post": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Void credit note",
        "description": "Cancels an issued document that has no payments.",
        "operationId": "post_credit_notes_id_void",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/credit_notes/{id}/pdf": {
      "get": {
        "tags": [
          "Credit notes"
        ],
        "summary": "Download the PDF credit note",
        "description": "",
        "operationId": "get_credit_notes_id_pdf",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/receipts": {
      "get": {
        "tags": [
          "Receipts"
        ],
        "summary": "List receipts",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_receipts",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/receipts/{id}": {
      "get": {
        "tags": [
          "Receipts"
        ],
        "summary": "Retrieve receipt",
        "description": "",
        "operationId": "get_receipts_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/receipts/{id}/pdf": {
      "get": {
        "tags": [
          "Receipts"
        ],
        "summary": "Download the PDF",
        "description": "",
        "operationId": "get_receipts_id_pdf",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "documents:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "List payments",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_payments",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "payments:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Record a payment",
        "description": "",
        "operationId": "post_payments",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "payments:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method",
                  "amount",
                  "currency"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "description": "cash, bank_transfer or manual."
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Minor units."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "allocations": {
                    "type": "array",
                    "description": "Rows of {document, amount}: what the payment pays. A receipt is issued."
                  },
                  "received_at": {
                    "type": "string",
                    "description": "ISO 8601."
                  },
                  "reference": {
                    "type": "string",
                    "description": ""
                  },
                  "note": {
                    "type": "string",
                    "description": ""
                  },
                  "pending": {
                    "type": "boolean",
                    "description": "Wait for confirmation."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Retrieve payment",
        "description": "",
        "operationId": "get_payments_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "payments:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/refund": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Refund a payment",
        "description": "",
        "operationId": "post_payments_id_refund",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "payments:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Minor units, at most what is left."
                  },
                  "reason": {
                    "type": "string",
                    "description": "requested_by_customer, duplicate, fraudulent or other."
                  },
                  "note": {
                    "type": "string",
                    "description": ""
                  },
                  "credit_note": {
                    "type": "boolean",
                    "description": "Also make a credit note."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payment_requests": {
      "get": {
        "tags": [
          "Payment requests"
        ],
        "summary": "List payment requests",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_payment_requests",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Payment requests"
        ],
        "summary": "Create a payment request",
        "description": "",
        "operationId": "post_payment_requests",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "currency",
                  "title"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Minor units."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "methods": {
                    "type": "array",
                    "description": "Limit the payment methods."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payment_requests/{id}": {
      "get": {
        "tags": [
          "Payment requests"
        ],
        "summary": "Retrieve payment request",
        "description": "",
        "operationId": "get_payment_requests_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions": {
      "get": {
        "tags": [
          "Checkout sessions"
        ],
        "summary": "List checkout sessions",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_checkout_sessions",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Checkout sessions"
        ],
        "summary": "Create checkout session",
        "description": "",
        "operationId": "post_checkout_sessions",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "invoice": {
                    "type": "string",
                    "description": "Invoice id. Send this or amount."
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Minor units. Needs currency."
                  },
                  "currency": {
                    "type": "string",
                    "description": ""
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  },
                  "methods": {
                    "type": "array",
                    "description": ""
                  },
                  "success_url": {
                    "type": "string",
                    "description": ""
                  },
                  "cancel_url": {
                    "type": "string",
                    "description": ""
                  },
                  "locale": {
                    "type": "string",
                    "description": ""
                  },
                  "expires_in": {
                    "type": "integer",
                    "description": "Seconds, 300 to 604800."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions/{id}": {
      "get": {
        "tags": [
          "Checkout sessions"
        ],
        "summary": "Retrieve checkout session",
        "description": "",
        "operationId": "get_checkout_sessions_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions/{id}/expire": {
      "post": {
        "tags": [
          "Checkout sessions"
        ],
        "summary": "Expire a checkout session",
        "description": "",
        "operationId": "post_checkout_sessions_id_expire",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_links": {
      "get": {
        "tags": [
          "Checkout links"
        ],
        "summary": "List checkout links",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_checkout_links",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Checkout links"
        ],
        "summary": "Create checkout link",
        "description": "",
        "operationId": "post_checkout_links",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": ""
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Minor units."
                  },
                  "currency": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkout_links/{id}": {
      "get": {
        "tags": [
          "Checkout links"
        ],
        "summary": "Retrieve checkout link",
        "description": "",
        "operationId": "get_checkout_links_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Checkout links"
        ],
        "summary": "Update checkout link",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_checkout_links_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": ""
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "amount": {
                    "type": "integer",
                    "description": "Minor units."
                  },
                  "currency": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Checkout links"
        ],
        "summary": "Delete checkout link",
        "description": "",
        "operationId": "delete_checkout_links_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "checkout:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/offers": {
      "get": {
        "tags": [
          "Offers"
        ],
        "summary": "List offers",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_offers",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Offers"
        ],
        "summary": "Create offer",
        "description": "",
        "operationId": "post_offers",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currency"
                ],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows like those of an invoice."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}": {
      "get": {
        "tags": [
          "Offers"
        ],
        "summary": "Retrieve offer",
        "description": "",
        "operationId": "get_offers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Offers"
        ],
        "summary": "Update offer",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_offers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "title": {
                    "type": "string",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows like those of an invoice."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Offers"
        ],
        "summary": "Delete offer",
        "description": "",
        "operationId": "delete_offers_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/send": {
      "post": {
        "tags": [
          "Offers"
        ],
        "summary": "Send an offer",
        "description": "",
        "operationId": "post_offers_id_send",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "Email it to the customer (default true)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/withdraw": {
      "post": {
        "tags": [
          "Offers"
        ],
        "summary": "Withdraw an offer",
        "description": "",
        "operationId": "post_offers_id_withdraw",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/plans": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "List plans",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_plans",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Create plan",
        "description": "",
        "operationId": "post_plans",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer",
                  "name",
                  "currency",
                  "interval",
                  "lines"
                ],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "interval": {
                    "type": "string",
                    "description": "day, week, month or year."
                  },
                  "interval_count": {
                    "type": "integer",
                    "description": ""
                  },
                  "anchor_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD of the first run."
                  },
                  "send_as": {
                    "type": "string",
                    "description": "invoice or pay_link."
                  },
                  "auto_send": {
                    "type": "boolean",
                    "description": ""
                  },
                  "days_until_due": {
                    "type": "integer",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows like those of an invoice."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Retrieve plan",
        "description": "",
        "operationId": "get_plans_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Plans"
        ],
        "summary": "Update plan",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_plans_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "customer": {
                    "type": "string",
                    "description": ""
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 code, for example EUR."
                  },
                  "interval": {
                    "type": "string",
                    "description": "day, week, month or year."
                  },
                  "interval_count": {
                    "type": "integer",
                    "description": ""
                  },
                  "anchor_date": {
                    "type": "string",
                    "description": "YYYY-MM-DD of the first run."
                  },
                  "send_as": {
                    "type": "string",
                    "description": "invoice or pay_link."
                  },
                  "auto_send": {
                    "type": "boolean",
                    "description": ""
                  },
                  "days_until_due": {
                    "type": "integer",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "Rows like those of an invoice."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Plans"
        ],
        "summary": "Delete plan",
        "description": "",
        "operationId": "delete_plans_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/pause": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Pause a plan",
        "description": "No runs until it is resumed.",
        "operationId": "post_plans_id_pause",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/resume": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Resume a plan",
        "description": "It starts again on its next date. Dates that passed while it was paused are not made up.",
        "operationId": "post_plans_id_resume",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/end": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "End a plan",
        "description": "No more runs, for good. Invoices already made stay.",
        "operationId": "post_plans_id_end",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/skip_next": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Skip the next run",
        "description": "The next date passes without an invoice or link and does not count towards max_runs.",
        "operationId": "post_plans_id_skip_next",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/run_now": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Run the next date now",
        "description": "Makes the invoice or pay link now. The answer has `result.ran` and, when it failed, the reason.",
        "operationId": "post_plans_id_run_now",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/plans/{id}/change": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Change a plan from the next period",
        "description": "The change waits on the plan and starts with the next run, or the first run on or after effective_on. Invoices already made are not touched.",
        "operationId": "post_plans_id_change",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "plans:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "effective_on": {
                    "type": "string",
                    "description": "YYYY-MM-DD."
                  },
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "interval": {
                    "type": "string",
                    "description": ""
                  },
                  "interval_count": {
                    "type": "integer",
                    "description": ""
                  },
                  "lines": {
                    "type": "array",
                    "description": "The new rows."
                  },
                  "max_runs": {
                    "type": "integer",
                    "description": ""
                  },
                  "ends_on": {
                    "type": "string",
                    "description": ""
                  },
                  "cancel": {
                    "type": "boolean",
                    "description": "Drop a waiting change."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "List events",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_events",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "object",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Retrieve event",
        "description": "",
        "operationId": "get_events_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints": {
      "get": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "List webhook endpoints",
        "description": "Newest first, 20 at a time. See pagination.",
        "operationId": "get_webhook_endpoints",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Create webhook endpoint",
        "description": "",
        "operationId": "post_webhook_endpoints",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "https only in live mode. Public addresses only."
                  },
                  "events": {
                    "type": "array",
                    "description": "Names (invoice.paid), groups (invoice.*) or *."
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}": {
      "get": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Retrieve webhook endpoint",
        "description": "",
        "operationId": "get_webhook_endpoints_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Update webhook endpoint",
        "description": "Send only what changes. `POST` to the same address works too.",
        "operationId": "patch_webhook_endpoints_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": ""
                  },
                  "events": {
                    "type": "array",
                    "description": ""
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  },
                  "status": {
                    "type": "string",
                    "description": "enabled or disabled. Enabling clears the failure count."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Delete webhook endpoint",
        "description": "",
        "operationId": "delete_webhook_endpoints_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/rotate_secret": {
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Rotate the signing secret",
        "description": "The answer has the new `secret`, once. The old secret keeps signing too for `expires_in_hours` (default 24, 0 to 168), so you can switch without a gap.",
        "operationId": "post_webhook_endpoints_id_rotate_secret",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "expires_in_hours": {
                    "type": "integer",
                    "description": "0 to 168."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/test": {
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Send a test event",
        "description": "Sends `webhook.test` now and answers with the delivery. It ignores the event filter and is tried once.",
        "operationId": "post_webhook_endpoints_id_test",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "List deliveries",
        "description": "Filter with ?status=pending, succeeded or dead.",
        "operationId": "get_webhook_endpoints_id_deliveries",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/replay": {
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Replay all dead deliveries",
        "description": "Queues a fresh delivery for every dead delivery that was not replayed yet (the 500 oldest).",
        "operationId": "post_webhook_endpoints_id_replay",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_deliveries/{id}": {
      "get": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Retrieve a delivery",
        "description": "",
        "operationId": "get_webhook_deliveries_id_",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_deliveries/{id}/replay": {
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "summary": "Replay one delivery",
        "description": "Sends the same event again, with the same webhook-id, as a new delivery.",
        "operationId": "post_webhook_deliveries_id_replay",
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object, or a list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "A problem document (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "sk_live_… or sk_test_… (or rk_… restricted keys)"
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      }
    }
  }
}
