{
  "openapi": "3.1.0",
  "info": {
    "title": "WorkMade Tax Payments API",
    "version": "2026-11-01",
    "summary": "Estimate, save and pay self-employed customers' quarterly federal and state taxes.",
    "description": "One API to work out what a self-employed customer owes the IRS and their state each quarter, save it from their deposits, and pay both agencies before the due date.\n\nThis is the design-partner preview, version `2026-11-01`. **Only sandbox keys (`wm_test_…`) work today**: a live key (`wm_live_…`) is refused with `403 live_not_available`, and nothing in the sandbox moves money or checks a real identity. Fields may change before general availability.\n\n- Amounts are whole cents (integers). Dates are `YYYY-MM-DD`; timestamps are ISO 8601 in UTC.\n- Every `POST` takes an `Idempotency-Key` header. The same key with the same request returns the first answer (with `Idempotent-Replayed: true`); the same key with a different request returns `409 idempotency_conflict`. Only requests that succeed claim their key.\n- Every response carries `WorkMade-Version: 2026-11-01`.\n- Errors are `{ \"error\": { \"code\", \"message\", \"param\" } }` with a matching HTTP status. Switch on `code`; `message` is safe to show.\n- Each key may make 25 requests a second (`429 rate_limited` with `Retry-After: 1` beyond that). Responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` headers.\n- Request bodies are JSON (`Content-Type: application/json`), up to 256 KB.\n\nHuman-readable docs: https://www.workmade.com/developers/docs. For coding assistants: https://www.workmade.com/developers/docs/llms.txt.",
    "termsOfService": "https://www.workmade.com/terms",
    "contact": {
      "name": "WorkMade Tax Payments API",
      "url": "https://www.workmade.com/developers",
      "email": "nick@workmade.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://www.workmade.com/terms"
    }
  },
  "externalDocs": {
    "description": "Tax Payments API docs",
    "url": "https://www.workmade.com/developers/docs"
  },
  "servers": [
    {
      "url": "https://api.workmade.com/v1",
      "description": "One address for sandbox and live: the key decides which. Sandbox keys start `wm_test_`; live keys start `wm_live_` and are not accepted yet."
    }
  ],
  "security": [
    {
      "secretKey": []
    }
  ],
  "tags": [
    {
      "name": "Taxpayers",
      "description": "The people you save and pay taxes for. Checks run the moment one is created."
    },
    {
      "name": "Verifications",
      "description": "The checks behind `ready_to_pay`."
    },
    {
      "name": "Estimates",
      "description": "What a taxpayer owes for a quarter, federal and state. Only the 2026 tax year is open in this version."
    },
    {
      "name": "Saving",
      "description": "Saving rules, reported deposits and the saved balance."
    },
    {
      "name": "Payments",
      "description": "Quarterly payments to the IRS and the state. Payments are mailed checks with the agency's own voucher, sent 12 days before the due date."
    },
    {
      "name": "Events",
      "description": "What has happened in the account, newest first."
    },
    {
      "name": "Webhook endpoints",
      "description": "Where events are sent, signed with the `WorkMade-Signature` header."
    },
    {
      "name": "Sandbox",
      "description": "Sandbox-only controls: move the clock forward, settle or bounce a payment, send a sample event."
    }
  ],
  "paths": {
    "/taxpayers": {
      "post": {
        "tags": [
          "Taxpayers"
        ],
        "operationId": "createTaxpayer",
        "summary": "Create a taxpayer",
        "description": "Adds a person and runs their checks at once. The full SSN, EIN and bank account and routing numbers are used for the checks and then dropped: only the last four digits are kept or returned.\n\nIn the sandbox: an `ssn` ending `0000` fails identity, one ending `1111` waits for a photo ID, an `ein` of `00-0000000` does not match, and a `name` containing `Sanctioned` is flagged. Anything else passes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxpayerCreate"
              },
              "example": {
                "name": "Maya Ortiz",
                "email": "maya@ortiz.studio",
                "state": "NY",
                "ssn": "123-45-6789",
                "date_of_birth": "1991-04-22",
                "filing_status": "single",
                "business": {
                  "name": "Ortiz Studio LLC",
                  "ein": "12-3450921"
                },
                "bank_account": {
                  "routing_number": "021000021",
                  "account_number": "000123456789"
                },
                "external_id": "usr_4471"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The taxpayer, with the result of their checks.",
            "headers": {
              "WorkMade-Version": {
                "$ref": "#/components/headers/WorkMadeVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Taxpayer"
                },
                "example": {
                  "id": "tp_8Kq2Xw9aLm",
                  "object": "taxpayer",
                  "name": "Maya Ortiz",
                  "email": "maya@ortiz.studio",
                  "state": "NY",
                  "filing_status": "single",
                  "business": {
                    "name": "Ortiz Studio LLC",
                    "ein_last4": "0921"
                  },
                  "bank_account": {
                    "last4": "6789"
                  },
                  "status": "ready",
                  "ready_to_pay": true,
                  "verification_id": "vrf_2HKbQ7mT4p",
                  "external_id": "usr_4471",
                  "created": "2026-11-02T15:04:11.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "get": {
        "tags": [
          "Taxpayers"
        ],
        "operationId": "listTaxpayers",
        "summary": "List taxpayers",
        "description": "Newest first.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only taxpayers with this status.",
            "schema": {
              "$ref": "#/components/schemas/TaxpayerStatus"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of taxpayers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxpayerList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "tp_8Kq2Xw9aLm",
                      "object": "taxpayer",
                      "name": "Maya Ortiz",
                      "email": "maya@ortiz.studio",
                      "state": "NY",
                      "filing_status": "single",
                      "business": {
                        "name": "Ortiz Studio LLC",
                        "ein_last4": "0921"
                      },
                      "bank_account": {
                        "last4": "6789"
                      },
                      "status": "ready",
                      "ready_to_pay": true,
                      "verification_id": "vrf_2HKbQ7mT4p",
                      "external_id": "usr_4471",
                      "created": "2026-11-02T15:04:11.000Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/taxpayers/{taxpayer_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TaxpayerId"
        }
      ],
      "get": {
        "tags": [
          "Taxpayers"
        ],
        "operationId": "getTaxpayer",
        "summary": "Retrieve a taxpayer",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The taxpayer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Taxpayer"
                },
                "example": {
                  "id": "tp_8Kq2Xw9aLm",
                  "object": "taxpayer",
                  "name": "Maya Ortiz",
                  "email": "maya@ortiz.studio",
                  "state": "NY",
                  "filing_status": "single",
                  "business": {
                    "name": "Ortiz Studio LLC",
                    "ein_last4": "0921"
                  },
                  "bank_account": {
                    "last4": "6789"
                  },
                  "status": "ready",
                  "ready_to_pay": true,
                  "verification_id": "vrf_2HKbQ7mT4p",
                  "external_id": "usr_4471",
                  "created": "2026-11-02T15:04:11.000Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/taxpayers/{taxpayer_id}/quarters/{quarter}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TaxpayerId"
        },
        {
          "name": "quarter",
          "in": "path",
          "required": true,
          "description": "The quarter, like `2026-Q4`.",
          "schema": {
            "$ref": "#/components/schemas/QuarterLabel"
          }
        }
      ],
      "get": {
        "tags": [
          "Estimates"
        ],
        "operationId": "getQuarter",
        "summary": "Retrieve a quarter",
        "description": "What is owed for one quarter, from its estimate, what is saved toward it and its payments. Returns `404` until an estimate exists for that quarter.\n\n`saved` is the payments already mailed or delivered for this quarter plus what is saved now, never more than `total`. Saved money is one balance per taxpayer, so it counts toward every quarter still to pay.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The quarter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quarter"
                },
                "example": {
                  "object": "quarter",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "quarter": "2026-Q4",
                  "due": "2027-01-15",
                  "total": 544500,
                  "saved": 544500,
                  "ready_to_pay": true,
                  "payments": []
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/taxpayers/{taxpayer_id}/balance": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TaxpayerId"
        }
      ],
      "get": {
        "tags": [
          "Saving"
        ],
        "operationId": "getBalance",
        "summary": "Retrieve the balance",
        "description": "How much is saved and whether it covers the next quarter that has no payments booked yet. `saved` is what deposits have put aside, less payments already mailed or delivered.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                },
                "example": {
                  "object": "balance",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "saved": 576000,
                  "owed_this_quarter": 544500,
                  "short_by": 0
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/verifications": {
      "post": {
        "tags": [
          "Verifications"
        ],
        "operationId": "createVerification",
        "summary": "Run checks again",
        "description": "Checks run on their own when a taxpayer is created. Call this after the taxpayer fixes something. In the sandbox, running the checks again clears a wait for a photo ID, and `pass_through.identity: \"verified\"` marks identity as verified.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationCreate"
              },
              "example": {
                "taxpayer_id": "tp_8Kq2Xw9aLm",
                "pass_through": {
                  "identity": "verified"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The taxpayer's verification, updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                },
                "example": {
                  "id": "vrf_2HKbQ7mT4p",
                  "object": "verification",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "status": "completed",
                  "ready_to_pay": true,
                  "checks": {
                    "identity": "verified",
                    "bank_account": "verified",
                    "ein": "match",
                    "ptin": "not_provided",
                    "sanctions": "clear"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/verifications/{verification_id}": {
      "parameters": [
        {
          "name": "verification_id",
          "in": "path",
          "required": true,
          "description": "Like `vrf_2HKbQ7mT4p`. A taxpayer's `verification_id`.",
          "schema": {
            "type": "string",
            "pattern": "^vrf_"
          }
        }
      ],
      "get": {
        "tags": [
          "Verifications"
        ],
        "operationId": "getVerification",
        "summary": "Retrieve a verification",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The verification.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                },
                "example": {
                  "id": "vrf_2HKbQ7mT4p",
                  "object": "verification",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "status": "completed",
                  "ready_to_pay": true,
                  "checks": {
                    "identity": "verified",
                    "bank_account": "verified",
                    "ein": "match",
                    "ptin": "not_provided",
                    "sanctions": "clear"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/estimates": {
      "post": {
        "tags": [
          "Estimates"
        ],
        "operationId": "createEstimate",
        "summary": "Create or update an estimate",
        "description": "Works out what the taxpayer owes for a quarter, federal and state, from their income and expenses so far this year (annualized at the pace seen so far, Form 2210 Schedule AI). One estimate per taxpayer and quarter: sending the same quarter again updates it in place and answers `200` instead of `201`.\n\nStates with no income tax (AK, FL, NV, NH, SD, TN, TX, WA, WY) return `state: null`. `safe_harbor` is only filled in when `prior_year_tax` is sent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateCreate"
              },
              "example": {
                "taxpayer_id": "tp_8Kq2Xw9aLm",
                "quarter": "2026-Q4",
                "income_ytd": 8420000,
                "expenses_ytd": 1265000,
                "prior_year_tax": 1500000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The estimate for that quarter already existed and was updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                },
                "example": {
                  "id": "est_5Hv2Rk8NwP",
                  "object": "estimate",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "quarter": "2026-Q4",
                  "due": "2027-01-15",
                  "federal": {
                    "form": "1040-ES",
                    "amount": 418000
                  },
                  "state": {
                    "code": "NY",
                    "form": "IT-2105",
                    "amount": 126500,
                    "due": "2027-01-15"
                  },
                  "total": 544500,
                  "safe_harbor": {
                    "method": "prior_year_100_percent",
                    "minimum": 375000
                  },
                  "created": "2026-11-26T14:22:05.000Z"
                }
              }
            }
          },
          "201": {
            "description": "A new estimate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                },
                "example": {
                  "id": "est_5Hv2Rk8NwP",
                  "object": "estimate",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "quarter": "2026-Q4",
                  "due": "2027-01-15",
                  "federal": {
                    "form": "1040-ES",
                    "amount": 418000
                  },
                  "state": {
                    "code": "NY",
                    "form": "IT-2105",
                    "amount": 126500,
                    "due": "2027-01-15"
                  },
                  "total": 544500,
                  "safe_harbor": {
                    "method": "prior_year_100_percent",
                    "minimum": 375000
                  },
                  "created": "2026-11-26T14:22:05.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/set_asides": {
      "post": {
        "tags": [
          "Saving"
        ],
        "operationId": "createSetAside",
        "summary": "Create a set-aside",
        "description": "Sets the taxpayer's saving rule. A taxpayer has one rule: a new one replaces the old and answers `200` instead of `201`.\n\n- `percent_of_deposits`: each deposit reported with `POST /deposits` saves `percent` of it. Needs `percent`.\n- `fixed`: a set `amount` on a `schedule`. Needs `amount` and `schedule`.\n\nOnce a taxpayer has a rule, payments are only booked when enough is saved to cover them.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAsideCreate"
              },
              "examples": {
                "percent": {
                  "summary": "24% of every deposit",
                  "value": {
                    "taxpayer_id": "tp_8Kq2Xw9aLm",
                    "rule": "percent_of_deposits",
                    "percent": 24
                  }
                },
                "fixed": {
                  "summary": "$500 a month",
                  "value": {
                    "taxpayer_id": "tp_8Kq2Xw9aLm",
                    "rule": "fixed",
                    "amount": 50000,
                    "schedule": "monthly"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The taxpayer's rule, replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetAside"
                },
                "example": {
                  "id": "sa_3Rm8Tq1VbN",
                  "object": "set_aside",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "rule": "percent_of_deposits",
                  "percent": 24,
                  "amount": null,
                  "schedule": null,
                  "status": "active"
                }
              }
            }
          },
          "201": {
            "description": "The taxpayer's first rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetAside"
                },
                "example": {
                  "id": "sa_3Rm8Tq1VbN",
                  "object": "set_aside",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "rule": "percent_of_deposits",
                  "percent": 24,
                  "amount": null,
                  "schedule": null,
                  "status": "active"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/deposits": {
      "post": {
        "tags": [
          "Saving"
        ],
        "operationId": "createDeposit",
        "summary": "Report a deposit",
        "description": "Tells us about income so its share is saved under the taxpayer's `percent_of_deposits` rule. With no rule, or a `fixed` rule, `saving` is `0`.\n\nIn the sandbox, a bank account ending `0003` never has the money: `saving` comes back `0` and a `balance.short` event is sent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepositCreate"
              },
              "example": {
                "taxpayer_id": "tp_8Kq2Xw9aLm",
                "amount": 400000,
                "received_on": "2026-10-03"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The deposit and what it saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deposit"
                },
                "example": {
                  "id": "dep_9Lp3Vr2KxQ",
                  "object": "deposit",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "amount": 400000,
                  "received_on": "2026-10-03",
                  "saving": 96000
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/payments": {
      "post": {
        "tags": [
          "Payments"
        ],
        "operationId": "createPayments",
        "summary": "Book a quarter's payments",
        "description": "Books this quarter's payments from its estimate: one to the IRS and one to the state. Each is a mailed check with the agency's own voucher, sent 12 days before that agency's due date. A state that only takes payment on its own website cannot be paid this way and is named in `not_supported`.\n\nThe taxpayer must have passed their checks (`verification_required`) and have an estimate for the quarter (`estimate_required`). With a saving rule, enough must be saved (`insufficient_set_aside`); without one, the taxpayer needs a bank account (`bank_account_required`). A second booking for the same quarter and agency is refused (`409 duplicate_payment`) unless the first was canceled or returned. Each payment sends a `payment.scheduled` event.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentsCreate"
              },
              "example": {
                "taxpayer_id": "tp_8Kq2Xw9aLm",
                "quarter": "2026-Q4"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The payments booked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsCreated"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "pay_7Hc1Mz3QwE",
                      "object": "payment",
                      "taxpayer_id": "tp_8Kq2Xw9aLm",
                      "agency": "IRS",
                      "form": "1040-ES",
                      "amount": 418000,
                      "method": "check",
                      "send_on": "2027-01-03",
                      "due": "2027-01-15",
                      "quarter": "2026-Q4",
                      "status": "scheduled",
                      "confirmation": null,
                      "attempts": []
                    },
                    {
                      "id": "pay_7Hc2Nw4RbT",
                      "object": "payment",
                      "taxpayer_id": "tp_8Kq2Xw9aLm",
                      "agency": "NY",
                      "form": "IT-2105",
                      "amount": 126500,
                      "method": "check",
                      "send_on": "2027-01-03",
                      "due": "2027-01-15",
                      "quarter": "2026-Q4",
                      "status": "scheduled",
                      "confirmation": null,
                      "attempts": []
                    }
                  ],
                  "not_supported": []
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`duplicate_payment`: that quarter is already booked for that agency. Or `idempotency_conflict`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "duplicate_payment",
                    "message": "There is already a 2026-Q4 payment to IRS for this taxpayer.",
                    "param": null
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request is well formed but the payments cannot be booked. `code` is one of `verification_required`, `estimate_required`, `agency_not_supported`, `nothing_to_pay`, `past_cutoff`, `insufficient_set_aside` or `bank_account_required`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "insufficient_set_aside": {
                    "value": {
                      "error": {
                        "code": "insufficient_set_aside",
                        "message": "Saved $2100.00 of $5445.00. Add $3345.00 before 2027-01-03.",
                        "param": null
                      }
                    }
                  },
                  "verification_required": {
                    "value": {
                      "error": {
                        "code": "verification_required",
                        "message": "This taxpayer has not passed their checks yet.",
                        "param": "taxpayer_id"
                      }
                    }
                  },
                  "estimate_required": {
                    "value": {
                      "error": {
                        "code": "estimate_required",
                        "message": "Create an estimate for 2026-Q4 first.",
                        "param": "quarter"
                      }
                    }
                  },
                  "past_cutoff": {
                    "value": {
                      "error": {
                        "code": "past_cutoff",
                        "message": "It is too late for a 2026-Q3 payment to arrive by its due date.",
                        "param": "quarter"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "get": {
        "tags": [
          "Payments"
        ],
        "operationId": "listPayments",
        "summary": "List payments",
        "description": "Newest first.",
        "parameters": [
          {
            "name": "taxpayer_id",
            "in": "query",
            "description": "Only this taxpayer's payments.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only payments with this status.",
            "schema": {
              "$ref": "#/components/schemas/PaymentStatus"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "pay_7Hc1Mz3QwE",
                      "object": "payment",
                      "taxpayer_id": "tp_8Kq2Xw9aLm",
                      "agency": "IRS",
                      "form": "1040-ES",
                      "amount": 418000,
                      "method": "check",
                      "send_on": "2027-01-03",
                      "due": "2027-01-15",
                      "quarter": "2026-Q4",
                      "status": "scheduled",
                      "confirmation": null,
                      "attempts": []
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/payments/{payment_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PaymentId"
        }
      ],
      "get": {
        "tags": [
          "Payments"
        ],
        "operationId": "getPayment",
        "summary": "Retrieve a payment",
        "description": "One payment, with every attempt.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "pay_7Hc1Mz3QwE",
                  "object": "payment",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "agency": "IRS",
                  "form": "1040-ES",
                  "amount": 418000,
                  "method": "check",
                  "send_on": "2027-01-03",
                  "due": "2027-01-15",
                  "quarter": "2026-Q4",
                  "status": "delivered",
                  "confirmation": "CHK-270115-8000",
                  "attempts": [
                    {
                      "method": "check",
                      "status": "mailed",
                      "at": "2027-01-03T15:00:00Z"
                    },
                    {
                      "method": "check",
                      "status": "delivered",
                      "at": "2027-01-15T17:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/payments/{payment_id}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PaymentId"
        }
      ],
      "post": {
        "tags": [
          "Payments"
        ],
        "operationId": "cancelPayment",
        "summary": "Cancel a payment",
        "description": "Only while it is `scheduled`. No body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The payment, canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`payment_not_cancelable`: the payment is no longer `scheduled`. Or `idempotency_conflict`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "payment_not_cancelable",
                    "message": "This payment is mailed; only a scheduled one can be canceled.",
                    "param": null
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "operationId": "listEvents",
        "summary": "List events",
        "description": "Everything that has happened in this mode, newest first. The same objects are sent to your webhook endpoints.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "evt_1vEd9Kp2Ws",
                      "object": "event",
                      "type": "payment.settled",
                      "created": "2027-01-15T17:00:04.000Z",
                      "data": {
                        "object": {
                          "id": "pay_7Hc1Mz3QwE",
                          "object": "payment",
                          "taxpayer_id": "tp_8Kq2Xw9aLm",
                          "agency": "IRS",
                          "form": "1040-ES",
                          "amount": 418000,
                          "method": "check",
                          "send_on": "2027-01-03",
                          "due": "2027-01-15",
                          "quarter": "2026-Q4",
                          "status": "delivered",
                          "confirmation": "CHK-270115-8000",
                          "attempts": [
                            {
                              "method": "check",
                              "status": "mailed",
                              "at": "2027-01-03T15:00:00Z"
                            },
                            {
                              "method": "check",
                              "status": "delivered",
                              "at": "2027-01-15T17:00:00Z"
                            }
                          ]
                        }
                      }
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/webhook_endpoints": {
      "post": {
        "tags": [
          "Webhook endpoints"
        ],
        "operationId": "createWebhookEndpoint",
        "summary": "Create a webhook endpoint",
        "description": "Adds an address that every event is sent to. The `secret` is only returned here, once. The address must be `https`, reachable from the internet, and new; you can have five per mode. Every event type is sent to every endpoint (`events: [\"*\"]`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              },
              "example": {
                "url": "https://api.yourapp.com/webhooks/workmade"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The endpoint, with its signing secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "example": {
                  "id": "5b8f2c1e-3a47-4d6b-9e0f-7c2d1a9b8e34",
                  "object": "webhook_endpoint",
                  "url": "https://api.yourapp.com/webhooks/workmade",
                  "events": [
                    "*"
                  ],
                  "secret": "whsec_…",
                  "status": "enabled"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/webhook_endpoints/{webhook_endpoint_id}": {
      "parameters": [
        {
          "name": "webhook_endpoint_id",
          "in": "path",
          "required": true,
          "description": "The endpoint's `id`, a UUID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "tags": [
          "Webhook endpoints"
        ],
        "operationId": "deleteWebhookEndpoint",
        "summary": "Delete a webhook endpoint",
        "description": "Stops sending events to it at once.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedWebhookEndpoint"
                },
                "example": {
                  "id": "5b8f2c1e-3a47-4d6b-9e0f-7c2d1a9b8e34",
                  "object": "webhook_endpoint",
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/test/advance_time": {
      "post": {
        "tags": [
          "Sandbox"
        ],
        "operationId": "advanceTime",
        "summary": "Move the sandbox's clock forward",
        "description": "Sandbox only. Moves this account's sandbox date forward and brings every payment up to it: a payment is mailed on its `send_on` date and delivered on its `due` date, sending `payment.settled`. A payment from a bank account ending `0002` comes back `returned` instead, sending `payment.returned`. The clock never moves back.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to"
                ],
                "properties": {
                  "to": {
                    "type": "string",
                    "format": "date",
                    "description": "The new date. Must be after the sandbox's current date."
                  }
                }
              },
              "example": {
                "to": "2027-01-16"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new date and what changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestClock"
                },
                "example": {
                  "object": "test_clock",
                  "now": "2027-01-16",
                  "payments_sent": 2,
                  "payments_settled": 2,
                  "payments_returned": 0
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/test/payments/{payment_id}/settle": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PaymentId"
        }
      ],
      "post": {
        "tags": [
          "Sandbox"
        ],
        "operationId": "settleTestPayment",
        "summary": "Deliver a payment now",
        "description": "Sandbox only. Moves one `scheduled` or `mailed` payment to `delivered`, with a confirmation, and sends `payment.settled`. No body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "The payment, delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "pay_7Hc1Mz3QwE",
                  "object": "payment",
                  "taxpayer_id": "tp_8Kq2Xw9aLm",
                  "agency": "IRS",
                  "form": "1040-ES",
                  "amount": 418000,
                  "method": "check",
                  "send_on": "2027-01-03",
                  "due": "2027-01-15",
                  "quarter": "2026-Q4",
                  "status": "delivered",
                  "confirmation": "CHK-270115-8000",
                  "attempts": [
                    {
                      "method": "check",
                      "status": "mailed",
                      "at": "2027-01-03T15:00:00Z"
                    },
                    {
                      "method": "check",
                      "status": "delivered",
                      "at": "2027-01-15T17:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/PaymentNotOpen"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/test/payments/{payment_id}/return": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PaymentId"
        }
      ],
      "post": {
        "tags": [
          "Sandbox"
        ],
        "operationId": "returnTestPayment",
        "summary": "Bounce a payment",
        "description": "Sandbox only. Moves a payment that is not already canceled or returned to `returned`, adds the failed attempt, and sends `payment.returned`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "account_closed",
                      "insufficient_funds",
                      "agency_rejected"
                    ],
                    "default": "account_closed"
                  }
                }
              },
              "example": {
                "reason": "insufficient_funds"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The payment, returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/PaymentNotOpen"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/test/webhooks": {
      "post": {
        "tags": [
          "Sandbox"
        ],
        "operationId": "sendTestWebhook",
        "summary": "Send a sample event",
        "description": "Sandbox only. Writes an event of that type with a sample object and sends it to every webhook endpoint, or only to `endpoint_id`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/WorkMadeVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "$ref": "#/components/schemas/EventType"
                  },
                  "endpoint_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Send to this endpoint only."
                  }
                }
              },
              "example": {
                "type": "payment.settled"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The event that was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                },
                "example": {
                  "id": "evt_4Qw8Hn2DkV",
                  "object": "event",
                  "type": "payment.settled",
                  "created": "2026-11-30T18:02:11.000Z",
                  "data": {
                    "object": {
                      "object": "payment",
                      "sample": true,
                      "note": "A sample object, sent because you asked for a test event."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationFailed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    }
  },
  "webhooks": {
    "event": {
      "post": {
        "operationId": "receiveEvent",
        "summary": "An event, sent to your endpoint",
        "description": "Every event is `POST`ed as JSON to each of your webhook endpoints for that mode, with `User-Agent: WorkMade-Webhooks/1`. Check the `WorkMade-Signature` header: `t=<unix seconds>,v1=<hex>`, where `v1` is the HMAC-SHA256 of `<t>.<raw body>` under the endpoint's `secret`. Reject a signature that does not match or is more than five minutes old.\n\nReply with any `2xx` within 10 seconds. In this version each event is sent once, with no retries: use `GET /events` to catch up on anything missed. Events can arrive out of order, so go by the object's `status`.",
        "security": [],
        "parameters": [
          {
            "name": "WorkMade-Signature",
            "in": "header",
            "required": true,
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`",
            "schema": {
              "type": "string"
            },
            "example": "t=1767225600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              },
              "example": {
                "id": "evt_1vEd9Kp2Ws",
                "object": "event",
                "type": "payment.settled",
                "created": "2027-01-15T17:00:04.000Z",
                "data": {
                  "object": {
                    "id": "pay_7Hc1Mz3QwE",
                    "object": "payment",
                    "taxpayer_id": "tp_8Kq2Xw9aLm",
                    "agency": "IRS",
                    "form": "1040-ES",
                    "amount": 418000,
                    "method": "check",
                    "send_on": "2027-01-03",
                    "due": "2027-01-15",
                    "quarter": "2026-Q4",
                    "status": "delivered",
                    "confirmation": "CHK-270115-8000",
                    "attempts": [
                      {
                        "method": "check",
                        "status": "mailed",
                        "at": "2027-01-03T15:00:00Z"
                      },
                      {
                        "method": "check",
                        "status": "delivered",
                        "at": "2027-01-15T17:00:00Z"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any 2xx within 10 seconds."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "secretKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "wm_test_… (sandbox) or wm_live_… (live)",
        "description": "Your secret key as a bearer token: `Authorization: Bearer wm_test_…`. Get a sandbox key from the partner dashboard. Keep keys on your servers; never in a browser, a mobile app or a repository."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Any unique string up to 200 characters. Retry a timed-out request with the same key and it is only done once.",
        "schema": {
          "type": "string",
          "maxLength": 200
        },
        "example": "6f1c2b7e-q4-tp_8Kq2Xw9aLm"
      },
      "WorkMadeVersion": {
        "name": "WorkMade-Version",
        "in": "header",
        "required": false,
        "description": "The API version for this request. `2026-11-01` is the only one; anything else is refused with `400 invalid_request`.",
        "schema": {
          "type": "string",
          "enum": [
            "2026-11-01"
          ]
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "How many to return, 1 to 100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        }
      },
      "StartingAfter": {
        "name": "starting_after",
        "in": "query",
        "description": "The last ID on the previous page, for the next page.",
        "schema": {
          "type": "string"
        }
      },
      "TaxpayerId": {
        "name": "taxpayer_id",
        "in": "path",
        "required": true,
        "description": "Like `tp_8Kq2Xw9aLm`.",
        "schema": {
          "type": "string",
          "pattern": "^tp_"
        }
      },
      "PaymentId": {
        "name": "payment_id",
        "in": "path",
        "required": true,
        "description": "Like `pay_7Hc1Mz3QwE`.",
        "schema": {
          "type": "string",
          "pattern": "^pay_"
        }
      }
    },
    "headers": {
      "WorkMadeVersion": {
        "description": "The version that answered, `2026-11-01`.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before trying again.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "`invalid_request`: a field is missing or wrong (`param` names it), the body is not a JSON object, or the `WorkMade-Version` is unknown.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "invalid_request",
                "message": "Send the quarter like 2026-Q4.",
                "param": "quarter"
              }
            }
          }
        }
      },
      "AuthenticationFailed": {
        "description": "`authentication_failed`: the key is missing, malformed or deleted.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "authentication_failed",
                "message": "Send your secret key as a bearer token: Authorization: Bearer wm_test_…",
                "param": null
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "`live_not_available`: live keys are not accepted yet. `account_paused`: the account is paused.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "live_not_available",
                "message": "Live is not open yet. Use a sandbox key (wm_test_…); nothing real moves there.",
                "param": null
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "`not_found`: no object with that ID in this mode, or no such endpoint.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "No taxpayer with that ID.",
                "param": null
              }
            }
          }
        }
      },
      "IdempotencyConflict": {
        "description": "`idempotency_conflict`: this `Idempotency-Key` was already used for a different request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "idempotency_conflict",
                "message": "This Idempotency-Key was already used for a different request.",
                "param": null
              }
            }
          }
        }
      },
      "PaymentNotOpen": {
        "description": "`payment_not_open`: the payment is already finished. Or `idempotency_conflict`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "payment_not_open",
                "message": "This payment is canceled.",
                "param": null
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "`rate_limited`: more than 25 requests in a second with this key.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests. Wait a second and try again.",
                "param": null
              }
            }
          }
        }
      },
      "ApiError": {
        "description": "`api_error`: something went wrong on our side. Safe to retry with the same `Idempotency-Key`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "api_error",
                "message": "Something went wrong on our side. It is safe to try again with the same Idempotency-Key.",
                "param": null
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "param"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "What went wrong, to switch on.",
                "enum": [
                  "invalid_request",
                  "authentication_failed",
                  "account_paused",
                  "live_not_available",
                  "not_found",
                  "idempotency_conflict",
                  "duplicate_payment",
                  "payment_not_cancelable",
                  "payment_not_open",
                  "verification_required",
                  "estimate_required",
                  "agency_not_supported",
                  "nothing_to_pay",
                  "past_cutoff",
                  "insufficient_set_aside",
                  "bank_account_required",
                  "rate_limited",
                  "api_error"
                ]
              },
              "message": {
                "type": "string",
                "description": "A plain sentence you can show."
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The field at fault, like `quarter` or `bank_account.routing_number`."
              }
            }
          }
        }
      },
      "Cents": {
        "type": "integer",
        "minimum": 0,
        "description": "An amount in whole cents."
      },
      "QuarterLabel": {
        "type": "string",
        "pattern": "^2026-Q[1-4]$",
        "description": "A quarter of the 2026 tax year, like `2026-Q4`. Only 2026 is open in this version.",
        "examples": [
          "2026-Q4"
        ]
      },
      "StateCode": {
        "type": "string",
        "description": "Two-letter US state, or DC.",
        "enum": [
          "AL",
          "AK",
          "AZ",
          "AR",
          "CA",
          "CO",
          "CT",
          "DE",
          "DC",
          "FL",
          "GA",
          "HI",
          "ID",
          "IL",
          "IN",
          "IA",
          "KS",
          "KY",
          "LA",
          "ME",
          "MD",
          "MA",
          "MI",
          "MN",
          "MS",
          "MO",
          "MT",
          "NE",
          "NV",
          "NH",
          "NJ",
          "NM",
          "NY",
          "NC",
          "ND",
          "OH",
          "OK",
          "OR",
          "PA",
          "RI",
          "SC",
          "SD",
          "TN",
          "TX",
          "UT",
          "VT",
          "VA",
          "WA",
          "WV",
          "WI",
          "WY"
        ]
      },
      "FilingStatus": {
        "type": "string",
        "enum": [
          "single",
          "married_joint",
          "married_separate",
          "head_of_household"
        ]
      },
      "TaxpayerStatus": {
        "type": "string",
        "enum": [
          "ready",
          "verifying",
          "action_required"
        ],
        "description": "`ready`: passed the checks. `verifying`: waiting for a photo ID. `action_required`: a check failed."
      },
      "TaxpayerCreate": {
        "type": "object",
        "required": [
          "name",
          "email",
          "state",
          "ssn",
          "date_of_birth"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120,
            "description": "Legal name."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "state": {
            "$ref": "#/components/schemas/StateCode"
          },
          "ssn": {
            "type": "string",
            "writeOnly": true,
            "description": "Full nine-digit Social Security number, with or without dashes. Used for the checks, then dropped: never stored or returned."
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "writeOnly": true
          },
          "filing_status": {
            "$ref": "#/components/schemas/FilingStatus",
            "default": "single"
          },
          "business": {
            "type": "object",
            "description": "Their business, if they have one.",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 2
              },
              "ein": {
                "type": "string",
                "writeOnly": true,
                "description": "Nine-digit EIN, with or without the dash. Only the last four are kept."
              }
            }
          },
          "bank_account": {
            "type": "object",
            "description": "The account they save and pay from. Only the last four digits are kept.",
            "required": [
              "routing_number",
              "account_number"
            ],
            "properties": {
              "routing_number": {
                "type": "string",
                "writeOnly": true,
                "description": "Nine digits."
              },
              "account_number": {
                "type": "string",
                "writeOnly": true,
                "description": "At least four digits."
              }
            }
          },
          "external_id": {
            "type": "string",
            "maxLength": 120,
            "description": "Your own ID for this person."
          }
        }
      },
      "Taxpayer": {
        "type": "object",
        "required": [
          "id",
          "object",
          "name",
          "email",
          "state",
          "filing_status",
          "business",
          "bank_account",
          "status",
          "ready_to_pay",
          "verification_id",
          "external_id",
          "created"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "tp_8Kq2Xw9aLm"
            ]
          },
          "object": {
            "type": "string",
            "const": "taxpayer"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/StateCode"
          },
          "filing_status": {
            "$ref": "#/components/schemas/FilingStatus"
          },
          "business": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "name",
              "ein_last4"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "ein_last4": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "bank_account": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "last4"
            ],
            "properties": {
              "last4": {
                "type": "string"
              }
            }
          },
          "status": {
            "$ref": "#/components/schemas/TaxpayerStatus"
          },
          "ready_to_pay": {
            "type": "boolean",
            "description": "Identity verified, sanctions clear and no EIN mismatch."
          },
          "verification_id": {
            "type": "string",
            "description": "Their verification, for `GET /verifications/{verification_id}`."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TaxpayerList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Taxpayer"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "CheckResult": {
        "type": "string",
        "enum": [
          "verified",
          "failed",
          "pending_document",
          "match",
          "mismatch",
          "clear",
          "flagged",
          "active",
          "not_provided"
        ]
      },
      "Checks": {
        "type": "object",
        "required": [
          "identity",
          "bank_account",
          "ein",
          "ptin",
          "sanctions"
        ],
        "properties": {
          "identity": {
            "$ref": "#/components/schemas/CheckResult",
            "description": "`verified`, `failed` or `pending_document`."
          },
          "bank_account": {
            "$ref": "#/components/schemas/CheckResult",
            "description": "`verified` or `not_provided`."
          },
          "ein": {
            "$ref": "#/components/schemas/CheckResult",
            "description": "`match`, `mismatch` or `not_provided`."
          },
          "ptin": {
            "$ref": "#/components/schemas/CheckResult",
            "description": "Always `not_provided` in this version."
          },
          "sanctions": {
            "$ref": "#/components/schemas/CheckResult",
            "description": "`clear` or `flagged`."
          }
        }
      },
      "VerificationCreate": {
        "type": "object",
        "required": [
          "taxpayer_id"
        ],
        "properties": {
          "taxpayer_id": {
            "type": "string"
          },
          "pass_through": {
            "type": "object",
            "description": "Checks you have already run yourself. Only `identity: \"verified\"` is used in this version.",
            "properties": {
              "identity": {
                "type": "string",
                "enum": [
                  "verified"
                ]
              }
            }
          }
        }
      },
      "Verification": {
        "type": "object",
        "required": [
          "id",
          "object",
          "taxpayer_id",
          "status",
          "ready_to_pay",
          "checks"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "verification"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed"
            ],
            "description": "`pending` while identity waits for a photo ID."
          },
          "ready_to_pay": {
            "type": "boolean"
          },
          "checks": {
            "$ref": "#/components/schemas/Checks"
          }
        }
      },
      "EstimateCreate": {
        "type": "object",
        "required": [
          "taxpayer_id",
          "quarter",
          "income_ytd"
        ],
        "properties": {
          "taxpayer_id": {
            "type": "string"
          },
          "quarter": {
            "$ref": "#/components/schemas/QuarterLabel"
          },
          "income_ytd": {
            "$ref": "#/components/schemas/Cents",
            "description": "Self-employment income so far this year, in cents."
          },
          "expenses_ytd": {
            "$ref": "#/components/schemas/Cents",
            "description": "Business expenses so far this year, in cents. Defaults to 0."
          },
          "withholding_ytd": {
            "$ref": "#/components/schemas/Cents",
            "description": "Federal tax already withheld from any W-2 job this year, in cents. Defaults to 0."
          },
          "prior_year_tax": {
            "$ref": "#/components/schemas/Cents",
            "description": "Last year's total tax, in cents, for the safe-harbor minimum."
          }
        }
      },
      "Estimate": {
        "type": "object",
        "required": [
          "id",
          "object",
          "taxpayer_id",
          "quarter",
          "due",
          "federal",
          "state",
          "total",
          "safe_harbor",
          "created"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "estimate"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "quarter": {
            "$ref": "#/components/schemas/QuarterLabel"
          },
          "due": {
            "type": "string",
            "format": "date",
            "description": "The federal due date."
          },
          "federal": {
            "type": "object",
            "required": [
              "form",
              "amount"
            ],
            "properties": {
              "form": {
                "type": "string",
                "const": "1040-ES"
              },
              "amount": {
                "$ref": "#/components/schemas/Cents"
              }
            }
          },
          "state": {
            "type": [
              "object",
              "null"
            ],
            "description": "`null` in a state with no income tax.",
            "required": [
              "code",
              "form",
              "amount",
              "due"
            ],
            "properties": {
              "code": {
                "$ref": "#/components/schemas/StateCode"
              },
              "form": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The state's estimated-payment voucher, like `IT-2105`."
              },
              "amount": {
                "$ref": "#/components/schemas/Cents"
              },
              "due": {
                "type": "string",
                "format": "date",
                "description": "The state's own due date for this quarter."
              }
            }
          },
          "total": {
            "$ref": "#/components/schemas/Cents",
            "description": "Federal plus state."
          },
          "safe_harbor": {
            "type": [
              "object",
              "null"
            ],
            "description": "Only when `prior_year_tax` was sent: the smallest quarterly payment that avoids an underpayment penalty.",
            "required": [
              "method",
              "minimum"
            ],
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "prior_year_100_percent",
                  "prior_year_110_percent",
                  "current_year_90_percent"
                ]
              },
              "minimum": {
                "$ref": "#/components/schemas/Cents",
                "description": "Per quarter, in cents."
              }
            }
          },
          "created": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Quarter": {
        "type": "object",
        "required": [
          "object",
          "taxpayer_id",
          "quarter",
          "due",
          "total",
          "saved",
          "ready_to_pay",
          "payments"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "quarter"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "quarter": {
            "$ref": "#/components/schemas/QuarterLabel"
          },
          "due": {
            "type": "string",
            "format": "date"
          },
          "total": {
            "$ref": "#/components/schemas/Cents"
          },
          "saved": {
            "$ref": "#/components/schemas/Cents",
            "description": "Payments already mailed or delivered for this quarter plus what is saved now, up to `total`."
          },
          "ready_to_pay": {
            "type": "boolean"
          },
          "payments": {
            "type": "array",
            "description": "This quarter's payments, oldest first.",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          }
        }
      },
      "SetAsideCreate": {
        "type": "object",
        "required": [
          "taxpayer_id",
          "rule"
        ],
        "properties": {
          "taxpayer_id": {
            "type": "string"
          },
          "rule": {
            "type": "string",
            "enum": [
              "percent_of_deposits",
              "fixed"
            ]
          },
          "percent": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60,
            "description": "For `percent_of_deposits`."
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "description": "For `fixed`: cents per period."
          },
          "schedule": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "before_due"
            ],
            "description": "For `fixed`."
          }
        }
      },
      "SetAside": {
        "type": "object",
        "required": [
          "id",
          "object",
          "taxpayer_id",
          "rule",
          "percent",
          "amount",
          "schedule",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "set_aside"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "rule": {
            "type": "string",
            "enum": [
              "percent_of_deposits",
              "fixed"
            ]
          },
          "percent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "schedule": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "weekly",
              "monthly",
              "before_due",
              null
            ]
          },
          "status": {
            "type": "string",
            "const": "active"
          }
        }
      },
      "DepositCreate": {
        "type": "object",
        "required": [
          "taxpayer_id",
          "amount"
        ],
        "properties": {
          "taxpayer_id": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "description": "In cents."
          },
          "received_on": {
            "type": "string",
            "format": "date",
            "description": "Defaults to today (the sandbox's date)."
          }
        }
      },
      "Deposit": {
        "type": "object",
        "required": [
          "id",
          "object",
          "taxpayer_id",
          "amount",
          "received_on",
          "saving"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "deposit"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Cents"
          },
          "received_on": {
            "type": "string",
            "format": "date"
          },
          "saving": {
            "$ref": "#/components/schemas/Cents",
            "description": "What this deposit put aside."
          }
        }
      },
      "Balance": {
        "type": "object",
        "required": [
          "object",
          "taxpayer_id",
          "saved",
          "owed_this_quarter",
          "short_by"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "balance"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "saved": {
            "$ref": "#/components/schemas/Cents"
          },
          "owed_this_quarter": {
            "$ref": "#/components/schemas/Cents",
            "description": "The latest estimate with no payments booked against it, or 0."
          },
          "short_by": {
            "$ref": "#/components/schemas/Cents"
          }
        }
      },
      "PaymentsCreate": {
        "type": "object",
        "required": [
          "taxpayer_id",
          "quarter"
        ],
        "properties": {
          "taxpayer_id": {
            "type": "string"
          },
          "quarter": {
            "$ref": "#/components/schemas/QuarterLabel"
          },
          "agencies": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            },
            "description": "Only these agencies, like `[\"IRS\"]` or `[\"NY\"]`. Defaults to both."
          }
        }
      },
      "PaymentStatus": {
        "type": "string",
        "enum": [
          "scheduled",
          "mailed",
          "delivered",
          "returned",
          "canceled"
        ],
        "description": "`scheduled`: booked, can still be canceled. `mailed`: the check is in the post. `delivered`: the agency has it and `confirmation` is filled in. `returned`: it bounced; `attempts` says why. `canceled`: canceled before it was sent."
      },
      "PaymentAttempt": {
        "type": "object",
        "required": [
          "method",
          "status",
          "at"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "check",
              "bank_debit"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "mailed",
              "delivered",
              "returned"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "account_closed",
              "insufficient_funds",
              "agency_rejected"
            ]
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Payment": {
        "type": "object",
        "required": [
          "id",
          "object",
          "taxpayer_id",
          "agency",
          "form",
          "amount",
          "method",
          "send_on",
          "due",
          "quarter",
          "status",
          "confirmation",
          "attempts"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "payment"
          },
          "taxpayer_id": {
            "type": "string"
          },
          "agency": {
            "type": "string",
            "description": "`IRS` or a state code."
          },
          "form": {
            "type": [
              "string",
              "null"
            ],
            "description": "The voucher, like `1040-ES` or `IT-2105`."
          },
          "amount": {
            "$ref": "#/components/schemas/Cents"
          },
          "method": {
            "type": "string",
            "const": "check",
            "description": "Every payment is a mailed check in this version."
          },
          "send_on": {
            "type": "string",
            "format": "date"
          },
          "due": {
            "type": "string",
            "format": "date"
          },
          "quarter": {
            "$ref": "#/components/schemas/QuarterLabel"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "confirmation": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAttempt"
            }
          }
        }
      },
      "PaymentsCreated": {
        "type": "object",
        "required": [
          "object",
          "data",
          "not_supported"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "not_supported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "States that only take payment on their own website, so were not booked."
          }
        }
      },
      "PaymentList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "EventType": {
        "type": "string",
        "enum": [
          "verification.completed",
          "estimate.updated",
          "balance.short",
          "payment.scheduled",
          "payment.held",
          "payment.settled",
          "payment.returned",
          "return.drafted"
        ],
        "description": "Sent today: `payment.scheduled`, `payment.settled`, `payment.returned` and `balance.short`. The others are reserved, and can be sent as samples with `POST /test/webhooks`."
      },
      "Event": {
        "type": "object",
        "required": [
          "id",
          "object",
          "type",
          "created",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "event"
          },
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "required": [
              "object"
            ],
            "properties": {
              "object": {
                "type": "object",
                "description": "The object the event is about, in full: a payment, or a balance for `balance.short`."
              }
            }
          }
        }
      },
      "EventList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "WebhookEndpointCreate": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "An `https` address reachable from the internet."
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "required": [
          "id",
          "object",
          "url",
          "events",
          "secret",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "const": "*"
            },
            "description": "Every event is sent."
          },
          "secret": {
            "type": "string",
            "description": "The signing secret, `whsec_…`. Only returned when the endpoint is created."
          },
          "status": {
            "type": "string",
            "const": "enabled"
          }
        }
      },
      "DeletedWebhookEndpoint": {
        "type": "object",
        "required": [
          "id",
          "object",
          "deleted"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "TestClock": {
        "type": "object",
        "required": [
          "object",
          "now",
          "payments_sent",
          "payments_settled",
          "payments_returned"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "test_clock"
          },
          "now": {
            "type": "string",
            "format": "date"
          },
          "payments_sent": {
            "type": "integer"
          },
          "payments_settled": {
            "type": "integer"
          },
          "payments_returned": {
            "type": "integer"
          }
        }
      }
    }
  }
}