{
    "openapi": "3.0.0",
    "info": {
        "description": "REST API for MSP partners to create customers, issue invoices, accept payments, reconcile transactions, manage vendors, process bills, and execute vendor payments. This API also provides endpoints for generating and fetching standalone payment requests.",
        "title": "Alternative Payments",
        "termsOfService": "https://www.alternativepayments.io/terms-of-use/",
        "contact": {},
        "version": "1.2.0"
    },
    "paths": {
        "/address/autocomplete": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": []
                    }
                ],
                "description": "Returns address suggestions from Google Places API",
                "tags": [
                    "Address"
                ],
                "summary": "Address autocomplete",
                "operationId": "addressAutocomplete",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/address_api.AutocompleteRequest"
                            }
                        }
                    },
                    "description": "Autocomplete request",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/address_api.AutocompleteResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/address/details": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": []
                    }
                ],
                "description": "Returns full address details from Google Places API",
                "tags": [
                    "Address"
                ],
                "summary": "Get address details",
                "operationId": "addressDetails",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/address_api.DetailsRequest"
                            }
                        }
                    },
                    "description": "Details request",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/address_api.DetailsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of bills with optional filtering",
                "tags": [
                    "Bills"
                ],
                "summary": "List bills",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Cursor for forward pagination",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Cursor for backward pagination",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by vendor ID",
                        "name": "vendor_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by bill status (draft, needs_approval, processing, paid, deleted, failed)",
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by bill number",
                        "name": "bill_number",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by bill source (manual, quickbooks, ocr)",
                        "name": "source",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Include soft-deleted bills",
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-BillReply"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Create a new bill. Optionally set status to \"needs_approval\" to skip draft and submit directly for approval.",
                "tags": [
                    "Bills"
                ],
                "summary": "Create a bill",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateBillInput"
                            }
                        }
                    },
                    "description": "Bill information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/bulk-delete": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Soft-delete multiple bills in a single request",
                "tags": [
                    "Bills"
                ],
                "summary": "Bulk delete bills",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkDeleteBillsInput"
                            }
                        }
                    },
                    "description": "Bill IDs to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkOperationReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/bulk-submit": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Submit multiple bills for approval in a single request",
                "tags": [
                    "Bills"
                ],
                "summary": "Bulk submit bills for approval",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkSubmitBillsInput"
                            }
                        }
                    },
                    "description": "Bill IDs to submit",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkOperationReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/upload": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Upload a document (PDF, PNG, JPEG), extract data via OCR, and create a bill",
                "tags": [
                    "Bills"
                ],
                "summary": "Upload bill document with OCR",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadBillDocumentInput"
                            }
                        }
                    },
                    "description": "Document to upload (base64-encoded content)",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UploadBillDocumentReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get bill details by ID, including line items, payment status, and status history",
                "tags": [
                    "Bills"
                ],
                "summary": "Get a bill",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Soft-delete a bill. Cannot delete bills in PROCESSING or PAID status.",
                "tags": [
                    "Bills"
                ],
                "summary": "Delete a bill",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteBillReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Partially update bill details. Cannot update bills in PROCESSING or PAID status.",
                "tags": [
                    "Bills"
                ],
                "summary": "Update a bill",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchBillInput"
                            }
                        }
                    },
                    "description": "Bill patch information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/{id}/document": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get the download URL for a bill's attached document",
                "tags": [
                    "Bills"
                ],
                "summary": "Get bill document",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillDocumentReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/{id}/pay-date": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Set or update the scheduled payment date for a bill",
                "tags": [
                    "Bills"
                ],
                "summary": "Update bill pay date",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdatePayDateInput"
                            }
                        }
                    },
                    "description": "Pay date",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdatePayDateReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/{id}/reject": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Reject a bill in NEEDS_APPROVAL status, transitioning it back to DRAFT",
                "tags": [
                    "Bills"
                ],
                "summary": "Reject a bill",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RejectBillInput"
                            }
                        }
                    },
                    "description": "Rejection reason",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RejectBillReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bills/{id}/submit": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Transition a bill from DRAFT to NEEDS_APPROVAL status",
                "tags": [
                    "Bills"
                ],
                "summary": "Submit bill for approval",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SubmitBillReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/card-form/credentials": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "checkout:read"
                        ]
                    }
                ],
                "description": "Returns the Evervault credentials required to initialize the secure card form",
                "tags": [
                    "Card Form"
                ],
                "summary": "Get card form credentials",
                "operationId": "getCardFormCredentials",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CardFormCredentials"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout-auth/init": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "checkout:write"
                        ]
                    }
                ],
                "description": "Generate a token for checkout flow",
                "tags": [
                    "CheckoutAuth"
                ],
                "summary": "Generate a token for checkout flow",
                "operationId": "initCheckoutAuth",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GenerateTokenResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/invoice": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves the invoice associated with the checkout token",
                "tags": [
                    "Checkout"
                ],
                "summary": "Get invoice from checkout token",
                "operationId": "checkoutGetInvoice",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutInvoiceReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/invoice/pdf-link": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves the PDF download link for the invoice associated with the checkout token",
                "tags": [
                    "Checkout"
                ],
                "summary": "Get invoice PDF link from checkout token",
                "operationId": "checkoutGetInvoicePdfLink",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutGetPdfLinkReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payment-methods": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves all payment methods for the customer associated with the checkout token",
                "tags": [
                    "Checkout"
                ],
                "summary": "Get payment methods from checkout token",
                "operationId": "checkoutListPaymentMethods",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutGetPaymentMethodsReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payment-methods/bank": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a new bank account payment method for the customer associated with the checkout token. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.",
                "tags": [
                    "Checkout"
                ],
                "summary": "Create a bank account payment method from checkout token",
                "operationId": "checkoutCreateBank",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCreateBankAccountInput"
                            }
                        }
                    },
                    "description": "Bank account information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCreateBankAccountResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payment-methods/card": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a new card payment method for the customer associated with the checkout token",
                "tags": [
                    "Checkout"
                ],
                "summary": "Create a card payment method from checkout token",
                "operationId": "checkoutCreateCard",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCreateCardInput"
                            }
                        }
                    },
                    "description": "Card information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCreateCardResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payment-methods/{card_id}/cvv": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Register an encrypted CVV token for a specific card. Uses customer_id and invoice_id from checkout token.",
                "tags": [
                    "Checkout"
                ],
                "summary": "Register CVV for a card payment from checkout token",
                "operationId": "checkoutVerifyCvv",
                "parameters": [
                    {
                        "description": "Card ID",
                        "name": "card_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCreateCardCvvInput"
                            }
                        }
                    },
                    "description": "CVV registration information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCreateCardCvvResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payment-methods/{card_id}/fees": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Calculate payment fees for a specific card payment method using checkout token",
                "tags": [
                    "Checkout"
                ],
                "summary": "Calculate card payment fees",
                "operationId": "checkoutGetCardFees",
                "parameters": [
                    {
                        "description": "Card ID",
                        "name": "card_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutGetCardPaymentFeesRequest"
                            }
                        }
                    },
                    "description": "Fee calculation request",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutGetCardPaymentFeesResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout/v1/payments": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a payment for the invoice associated with the checkout token. Customer ID and invoice ID are extracted from the token.",
                "tags": [
                    "Checkout"
                ],
                "summary": "Create a payment from checkout token",
                "operationId": "checkoutCreatePayment",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCreatePaymentInput"
                            }
                        }
                    },
                    "description": "Payment information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCreatePaymentResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of customers with optional filtering",
                "tags": [
                    "Customers"
                ],
                "summary": "List customers",
                "operationId": "listCustomers",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date start (RFC3339 format)",
                        "name": "created_at_start",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date end (RFC3339 format)",
                        "name": "created_at_end",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by customer name",
                        "name": "company_name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-CustomerReply"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:write"
                        ]
                    }
                ],
                "description": "Create a new customer with the provided information",
                "tags": [
                    "Customers"
                ],
                "summary": "Create a customer",
                "operationId": "createCustomer",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCustomerInput"
                            }
                        }
                    },
                    "description": "Customer information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Get customer details by ID",
                "tags": [
                    "Customers"
                ],
                "summary": "Get a customer",
                "operationId": "getCustomer",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:write"
                        ]
                    }
                ],
                "description": "Archive a customer",
                "tags": [
                    "Customers"
                ],
                "summary": "Archive a customer",
                "operationId": "archiveCustomer",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:write"
                        ]
                    }
                ],
                "description": "Patch customer information (company, legal name, EIN, street address, sub-premise, city, state, postal code, country)",
                "tags": [
                    "Customers"
                ],
                "summary": "Patch customer",
                "operationId": "updateCustomer",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchCustomerRequest"
                            }
                        }
                    },
                    "description": "Customer patch information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Get payment methods associated with a customer",
                "tags": [
                    "Customers"
                ],
                "summary": "List payment methods",
                "operationId": "listPaymentMethods",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetPaymentMethodsReply"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/bank": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Create a new bank account with the provided information. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Create a customer bank account",
                "operationId": "createBankPaymentMethod",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateBankAccountInput"
                            }
                        }
                    },
                    "description": "BankAccount information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateBankAccountResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/card": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Create a new card with the provided tokenized information",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Create a customer card",
                "operationId": "createCardPaymentMethod",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCardInput"
                            }
                        }
                    },
                    "description": "Card information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateCardResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/{card_id}/cvv": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Register an encrypted CVV token for a specific card and invoice",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Register CVV for a card payment",
                "operationId": "verifyCardCvv",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Card ID",
                        "name": "card_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCardCvvInput"
                            }
                        }
                    },
                    "description": "CVV registration information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateCardCvvResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/{card_id}/fees": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Calculate payment fees for a specific card payment method",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Calculate card payment fees",
                "operationId": "getCardPaymentFees",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Card ID",
                        "name": "card_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetCardPaymentFeesRequest"
                            }
                        }
                    },
                    "description": "Fee calculation request",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetCardPaymentFeesResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/{method_id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Get a specific payment method associated with a customer by payment method ID",
                "tags": [
                    "Customers"
                ],
                "summary": "Get payment method by ID",
                "operationId": "getPaymentMethod",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Payment Method ID",
                        "name": "method_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentMethod"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Delete this payment method",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Delete a customer's payment method",
                "operationId": "deletePaymentMethod",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Payment Method ID",
                        "name": "method_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeletePaymentMethodResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/payment-methods/{method_id}/default": {
            "patch": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Change the customer's default payment method to this one",
                "tags": [
                    "PaymentMethods"
                ],
                "summary": "Change a customer's default payment method",
                "operationId": "setDefaultPaymentMethod",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Payment Method ID",
                        "name": "method_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChangeDefaultResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/restore": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:write"
                        ]
                    }
                ],
                "description": "Restore a customer",
                "tags": [
                    "Customers"
                ],
                "summary": "Restore a customer",
                "operationId": "restoreCustomer",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}/users": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of users from a customer",
                "tags": [
                    "Customers"
                ],
                "summary": "List customer users",
                "operationId": "listCustomerUsers",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-CustomerUser"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "customers:write"
                        ]
                    }
                ],
                "description": "Create a new customer user with the provided information",
                "tags": [
                    "Customers"
                ],
                "summary": "Create a customer user",
                "operationId": "createCustomerUser",
                "parameters": [
                    {
                        "description": "Customer ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCustomerUserInput"
                            }
                        }
                    },
                    "description": "Customer user information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerUser"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of invoices with optional filtering",
                "tags": [
                    "Invoices"
                ],
                "summary": "List invoices",
                "operationId": "listInvoices",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date start (RFC3339 format)",
                        "name": "created_at_start",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date end (RFC3339 format)",
                        "name": "created_at_end",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by due date start (RFC3339 format)",
                        "name": "due_date_start",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by due date end (RFC3339 format)",
                        "name": "due_date_end",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by customer ID",
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by invoice number",
                        "name": "invoice_number",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by invoice status",
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "UPCOMING",
                                "OVERDUE",
                                "RECEIVED",
                                "PAID",
                                "ARCHIVED"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-Invoice"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:write"
                        ]
                    }
                ],
                "description": "Create a new invoice with line items",
                "tags": [
                    "Invoices"
                ],
                "summary": "Create an invoice",
                "operationId": "createInvoice",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateInvoiceInput"
                            }
                        }
                    },
                    "description": "Invoice information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Invoice"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:read"
                        ]
                    }
                ],
                "description": "Get invoice details by ID",
                "tags": [
                    "Invoices"
                ],
                "summary": "Get an invoice",
                "operationId": "getInvoice",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Invoice"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:write"
                        ]
                    }
                ],
                "description": "Archive an invoice",
                "tags": [
                    "Invoices"
                ],
                "summary": "Archive an invoice",
                "operationId": "archiveInvoice",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Invoice"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices/{id}/payment-link": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:read"
                        ]
                    }
                ],
                "description": "Get a payment link for the specified invoice",
                "tags": [
                    "Invoices"
                ],
                "summary": "Get hosted payment link for invoice",
                "operationId": "getInvoicePaymentLink",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetPaymentLinkData"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices/{id}/pdf": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:write"
                        ]
                    }
                ],
                "description": "Upload the original invoice PDF (max 10 MB). Provide exactly one of `content` (base64-encoded bytes) or `url` (a public HTTPS link we download once, at upload time). Both variants behave identically once accepted: we store our own copy of the bytes and never read the link again, so the document keeps serving even if your host later goes away, and an unreachable link fails this request outright rather than degrading for a customer later. **Updates are push-only:** we never re-read the link or poll for changes, so a PDF updated in your system is not reflected here until you send this request again — with fresh `content`, or with the `url` (the same url is fine; we re-download it at that moment). Each upload replaces the previous PDF; last write wins. Only invoices synced from an accounting integration accept a PDF: an invoice created through `POST /invoices` has no original document from your system, and returns `422 unsupported_invoice`.",
                "tags": [
                    "Invoices"
                ],
                "summary": "Upload invoice PDF",
                "operationId": "uploadInvoicePdf",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadInvoicePdfInput"
                            }
                        }
                    },
                    "description": "PDF to upload: exactly one of content (base64-encoded bytes) or url (public HTTPS link, downloaded once at upload time)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "`path` is the stored location of the PDF, for both variants. It is an opaque identifier — retrieve the document via GET /invoices/{id}/pdf-link",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UploadInvoicePdfReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request: both or neither of `content`/`url` provided; `content` is not valid base64 or does not decode to a PDF; `url` is not HTTPS, redirects to a non-HTTPS location, is unreachable (non-2xx), resolves to a blocked address, exceeds the redirect limit, times out, or does not return a PDF",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Invoice not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "The PDF exceeds the 10 MB limit (applies to both the decoded `content` bytes and the `url` response body)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The invoice is not synced from an accounting integration",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices/{id}/pdf-link": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:read"
                        ]
                    }
                ],
                "description": "Get a signed PDF URL for the specified invoice",
                "tags": [
                    "Invoices"
                ],
                "summary": "Get invoice PDF link",
                "operationId": "getInvoicePdfLink",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetPdfLinkData"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoices/{id}/restore": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "invoices:write"
                        ]
                    }
                ],
                "description": "Restore an invoice",
                "tags": [
                    "Invoices"
                ],
                "summary": "Restore an invoice",
                "operationId": "restoreInvoice",
                "parameters": [
                    {
                        "description": "Invoice ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Invoice"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/oauth/token": {
            "post": {
                "security": [
                    {
                        "BasicAuth": []
                    }
                ],
                "description": "OAuth2 client credentials flow endpoint. Generate a new access token using client credentials. The \"client_id\" (username) and \"client_secret\" (password) must be passed as Basic Auth credentials. Ex: Authorization: Basic Base64Encode(client_id:client_secret). The returned access token should be used as Bearer token for subsequent API calls: Authorization: Bearer {access_token}",
                "tags": [
                    "OAuth"
                ],
                "summary": "Get OAuth2 access token",
                "operationId": "createOAuthToken",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "grant_type": {
                                        "description": "OAuth2 grant type - must be 'client_credentials'",
                                        "type": "string",
                                        "default": "client_credentials"
                                    }
                                },
                                "required": [
                                    "grant_type"
                                ]
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Successfully generated OAuth2 access token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TokenResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of payments with optional filtering",
                "tags": [
                    "Payments"
                ],
                "summary": "List payments",
                "operationId": "listPayments",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by payment type",
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "payment",
                                "refund",
                                "chargeback"
                            ]
                        }
                    },
                    {
                        "description": "Filter by payment status",
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "creating",
                                "processing",
                                "scheduled",
                                "succeeded",
                                "canceled",
                                "failed",
                                "pending"
                            ]
                        }
                    },
                    {
                        "description": "Filter by customer ID",
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by invoice ID",
                        "name": "invoice_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by payment method",
                        "name": "payment_method",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "card",
                                "standard_ach",
                                "same_day_ach",
                                "manual"
                            ]
                        }
                    },
                    {
                        "description": "Filter by creation date start (RFC3339 format)",
                        "name": "created_at_start",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date end (RFC3339 format)",
                        "name": "created_at_end",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-Payment"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Create a single payment to charge an invoice.",
                "tags": [
                    "Payments"
                ],
                "summary": "Create payment",
                "operationId": "createPayment",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreatePaymentRequest"
                            }
                        }
                    },
                    "description": "Payment request details",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Payment is being processed!",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments/request": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:write"
                        ]
                    }
                ],
                "description": "Create a new payment request with a specified amount, redirecting to the given url",
                "tags": [
                    "Payment request"
                ],
                "summary": "Generate a new payment request",
                "operationId": "createPaymentRequest",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PaymentRequestInput"
                            }
                        }
                    },
                    "description": "Payment request information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentRequest"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments/request/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:read"
                        ]
                    }
                ],
                "description": "Retrieves a payment request, together with its current status",
                "tags": [
                    "Payment request"
                ],
                "summary": "Retrieve a payment request by id",
                "operationId": "getPaymentRequest",
                "parameters": [
                    {
                        "description": "ID of the payment request",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentRequest"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payments:read"
                        ]
                    }
                ],
                "description": "Retrieve detailed information about a specific payment",
                "tags": [
                    "Payments"
                ],
                "summary": "Get payment by ID",
                "operationId": "getPayment",
                "parameters": [
                    {
                        "description": "Payment ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payouts": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payouts:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of payouts with optional filtering",
                "tags": [
                    "Payouts"
                ],
                "summary": "List payouts",
                "operationId": "listPayouts",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by payout status",
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "unspecified",
                                "creating",
                                "processing",
                                "analyzing",
                                "succeeded",
                                "scheduled",
                                "approved",
                                "canceled",
                                "pending",
                                "failed"
                            ]
                        }
                    },
                    {
                        "description": "Filter by customer ID",
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by invoice ID",
                        "name": "invoice_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by start date (RFC3339 format)",
                        "name": "start_date",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by end date (RFC3339 format)",
                        "name": "end_date",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-Payout"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payouts/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payouts:read"
                        ]
                    }
                ],
                "description": "Get payout details by ID",
                "tags": [
                    "Payouts"
                ],
                "summary": "Get a payout",
                "operationId": "getPayout",
                "parameters": [
                    {
                        "description": "Payout ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payout"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payouts/{id}/transactions": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "payouts:read"
                        ]
                    }
                ],
                "description": "Get payout transactions by ID",
                "tags": [
                    "Payouts"
                ],
                "summary": "Get a payout transactions",
                "operationId": "listPayoutTransactions",
                "parameters": [
                    {
                        "description": "Payout ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTransactionsReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/preferences/theme": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": []
                    }
                ],
                "description": "Get the partner's theme customization including colors and logo",
                "tags": [
                    "Preferences"
                ],
                "summary": "Get partner theme preferences",
                "operationId": "getPartnerTheme",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetThemeReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/refunds": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "refunds:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of refunds with optional filtering",
                "tags": [
                    "Refunds"
                ],
                "summary": "List refunds",
                "operationId": "listRefunds",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by customer ID",
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by invoice ID",
                        "name": "invoice_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by payment method",
                        "name": "payment_method",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "card",
                                "standard_ach",
                                "same_day_ach",
                                "manual"
                            ]
                        }
                    },
                    {
                        "description": "Filter by creation date start (RFC3339 format)",
                        "name": "created_at_start",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by creation date end (RFC3339 format)",
                        "name": "created_at_end",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-RefundReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "refunds:write"
                        ]
                    }
                ],
                "description": "Create a full refund for a payment. Partial refunds are not supported.",
                "tags": [
                    "Refunds"
                ],
                "summary": "Create refund",
                "operationId": "createRefund",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateRefundRequest"
                            }
                        }
                    },
                    "description": "Refund details",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Refund is being processed!",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/refunds/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "refunds:read"
                        ]
                    }
                ],
                "description": "Retrieve detailed information about a specific refund",
                "tags": [
                    "Refunds"
                ],
                "summary": "Get refund by ID",
                "operationId": "getRefund",
                "parameters": [
                    {
                        "description": "Refund ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RefundReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendor-payments": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Initiate payment for one or more bills. Bills must have pay_date set (422 if null).",
                "tags": [
                    "Vendor Payments"
                ],
                "summary": "Initiate vendor payment",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateVendorPaymentInput"
                            }
                        }
                    },
                    "description": "Payment items",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateVendorPaymentReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendor-payments/bulk-cancel": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Cancel multiple vendor payments in a single request",
                "tags": [
                    "Vendor Payments"
                ],
                "summary": "Bulk cancel vendor payments",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkCancelVendorPaymentsInput"
                            }
                        }
                    },
                    "description": "Payments to cancel",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkCancelVendorPaymentsReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendor-payments/cancel": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Cancel a single vendor payment",
                "tags": [
                    "Vendor Payments"
                ],
                "summary": "Cancel vendor payment",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CancelVendorPaymentInput"
                            }
                        }
                    },
                    "description": "Payment to cancel",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CancelVendorPaymentReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendor-payments/{bill_id}/retry": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Retry the last failed funding attempt for a bill",
                "tags": [
                    "Vendor Payments"
                ],
                "summary": "Retry failed vendor payment",
                "parameters": [
                    {
                        "description": "Bill ID",
                        "name": "bill_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RetryVendorPaymentReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of vendors with optional filtering",
                "tags": [
                    "Vendors"
                ],
                "summary": "List vendors",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Cursor for forward pagination",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Cursor for backward pagination",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by active status",
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "description": "Filter by origin (manual, quickbooks, ocr)",
                        "name": "origin",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by vendor name",
                        "name": "vendor_name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-VendorReply"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Create a new vendor with the provided information. Optionally include bank account details.",
                "tags": [
                    "Vendors"
                ],
                "summary": "Create a vendor",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateVendorInput"
                            }
                        }
                    },
                    "description": "Vendor information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/VendorReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get vendor details by ID",
                "tags": [
                    "Vendors"
                ],
                "summary": "Get a vendor",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/VendorReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Partially update vendor details",
                "tags": [
                    "Vendors"
                ],
                "summary": "Update a vendor",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchVendorInput"
                            }
                        }
                    },
                    "description": "Vendor patch information",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/VendorReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/bank-account": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get the vendor's bank account details (masked)",
                "tags": [
                    "Vendors"
                ],
                "summary": "Get vendor bank account",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BankAccountReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Create or replace the vendor's bank account",
                "tags": [
                    "Vendors"
                ],
                "summary": "Add or update vendor bank account",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertBankAccountInput"
                            }
                        }
                    },
                    "description": "Bank account details",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BankAccountReply"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/data-request": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Send a self-service data collection link to the vendor",
                "tags": [
                    "Vendors"
                ],
                "summary": "Create vendor data request",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateVendorDataRequestReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/data-requests": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:read"
                        ]
                    }
                ],
                "description": "Get all data requests for a vendor",
                "tags": [
                    "Vendors"
                ],
                "summary": "List vendor data requests",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListVendorDataRequestsReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/data-requests/{request_id}/resend": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Resend the data collection email for a vendor data request",
                "tags": [
                    "Vendors"
                ],
                "summary": "Resend vendor data request",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Data Request ID",
                        "name": "request_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ResendVendorDataRequestReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/deactivate": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Deactivate a vendor, setting is_active to false",
                "tags": [
                    "Vendors"
                ],
                "summary": "Deactivate a vendor",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateVendorReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/vendors/{id}/reactivate": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "accounts_payable:write"
                        ]
                    }
                ],
                "description": "Reactivate a previously deactivated vendor",
                "tags": [
                    "Vendors"
                ],
                "summary": "Reactivate a vendor",
                "parameters": [
                    {
                        "description": "Vendor ID",
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReactivateVendorReply"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "webhooks:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of webhook subscriptions with optional filtering",
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhook subscriptions",
                "operationId": "listWebhookSubscriptions",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Cursor for forward pagination",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Cursor for backward pagination",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by webhook topic",
                        "name": "topic",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "payout_paid",
                                "payout_failed",
                                "payout_processing",
                                "payout_scheduled",
                                "customer_created",
                                "customer_updated",
                                "customer_archived",
                                "payment_succeeded",
                                "payment_chargeback",
                                "payment_refunded",
                                "invoice_paid",
                                "invoice_archived",
                                "invoice_created",
                                "invoice_updated",
                                "payment_failed",
                                "payment_method_added",
                                "payment_method_deleted",
                                "default_payment_method_changed",
                                "vendor_created",
                                "vendor_updated",
                                "vendor_deactivated",
                                "vendor_reactivated",
                                "bill_created",
                                "bill_updated",
                                "bill_submitted",
                                "bill_rejected",
                                "bill_deleted",
                                "vendor_payment_processing",
                                "vendor_payment_succeeded",
                                "vendor_payment_failed",
                                "vendor_payment_canceled",
                                "vendor_data_request_submitted"
                            ]
                        }
                    },
                    {
                        "description": "Filter by active status",
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-WebhookSubscription"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "webhooks:write"
                        ]
                    }
                ],
                "description": "Subscribe to a webhook with the provided information",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Subscribe to a webhook",
                "operationId": "createWebhookSubscription",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SubscribeWebhookInput"
                            }
                        }
                    },
                    "description": "Webhook information",
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookSubscription"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/events": {
            "get": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "webhooks:read"
                        ]
                    }
                ],
                "description": "Get a paginated list of webhook events with optional filtering",
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhook events",
                "operationId": "listWebhookEvents",
                "parameters": [
                    {
                        "description": "Number of items to return",
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "description": "Cursor for forward pagination",
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Cursor for backward pagination",
                        "name": "before",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter by webhook topic",
                        "name": "topic",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "payout_paid",
                                "payout_failed",
                                "payout_processing",
                                "payout_scheduled",
                                "customer_created",
                                "customer_updated",
                                "customer_archived",
                                "payment_succeeded",
                                "payment_chargeback",
                                "payment_refunded",
                                "invoice_paid",
                                "invoice_archived",
                                "invoice_created",
                                "invoice_updated",
                                "payment_failed",
                                "payment_method_added",
                                "payment_method_deleted",
                                "default_payment_method_changed",
                                "vendor_created",
                                "vendor_updated",
                                "vendor_deactivated",
                                "vendor_reactivated",
                                "bill_created",
                                "bill_updated",
                                "bill_submitted",
                                "bill_rejected",
                                "bill_deleted",
                                "vendor_payment_processing",
                                "vendor_payment_succeeded",
                                "vendor_payment_failed",
                                "vendor_payment_canceled",
                                "vendor_data_request_submitted"
                            ]
                        }
                    },
                    {
                        "description": "Filter by event status",
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "sent",
                                "failed"
                            ]
                        }
                    },
                    {
                        "description": "Filter events created after this date (ISO 8601)",
                        "name": "from_date",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Filter events created before this date (ISO 8601)",
                        "name": "to_date",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedResponse-WebhookEvent"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/retry": {
            "post": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "webhooks:write"
                        ]
                    }
                ],
                "description": "Retry all failed webhook events for the partner",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Retry failed webhooks",
                "operationId": "retryWebhookEvent",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RetryWebhooksResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/{subscription_id}": {
            "delete": {
                "security": [
                    {
                        "OAuth2ClientCredentials": [
                            "webhooks:write"
                        ]
                    }
                ],
                "description": "Remove a webhook subscription by ID",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Unsubscribe from a webhook",
                "operationId": "deleteWebhookSubscription",
                "parameters": [
                    {
                        "description": "Subscription ID",
                        "name": "subscription_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookSubscription"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HttpError"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "servers": [
        {
            "url": "//public-api.alternativepayments.io"
        }
    ],
    "components": {
        "securitySchemes": {
            "BasicAuth": {
                "type": "http",
                "scheme": "basic"
            },
            "BearerAuth": {
                "description": "Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.",
                "type": "apiKey",
                "name": "Authorization",
                "in": "header"
            },
            "OAuth2ClientCredentials": {
                "description": "OAuth2 client credentials flow. Authenticate with client credentials to /oauth/token to receive an access token, then use as Bearer token for API calls.",
                "type": "oauth2",
                "flows": {
                    "clientCredentials": {
                        "tokenUrl": "/oauth/token",
                        "scopes": {
                            "read": "Read access",
                            "write": "Write access"
                        }
                    }
                }
            }
        },
        "schemas": {
            "AccountTypeEnum": {
                "description": "Bank account type enum",
                "type": "string",
                "enum": [
                    "checking",
                    "savings"
                ],
                "x-enum-varnames": [
                    "AccountTypeChecking",
                    "AccountTypeSavings"
                ]
            },
            "AddressInput": {
                "description": "Address information",
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "state_code": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "subpremise": {
                        "type": "string"
                    }
                }
            },
            "BankAccountInput": {
                "description": "Bank account details for vendor creation",
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "account_type": {
                        "type": "string"
                    },
                    "bank_name": {
                        "type": "string"
                    },
                    "routing_number": {
                        "type": "string"
                    }
                }
            },
            "BankAccountReply": {
                "description": "Vendor bank account details (masked)",
                "type": "object",
                "properties": {
                    "account_mask": {
                        "type": "string"
                    },
                    "account_type": {
                        "$ref": "#/components/schemas/AccountTypeEnum"
                    },
                    "bank_name": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "payment_method_id": {
                        "type": "string"
                    }
                }
            },
            "BillDocumentReply": {
                "description": "Bill document download details",
                "type": "object",
                "properties": {
                    "download_url": {
                        "type": "string"
                    },
                    "filename": {
                        "type": "string"
                    },
                    "mime_type": {
                        "type": "string"
                    }
                }
            },
            "BillLineItemInput": {
                "description": "Bill line item input",
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "expense_account_id": {
                        "description": "ExpenseAccountID is an optional GL/expense account ID used to categorize this line item. Omit to leave it uncategorized.",
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "number"
                    },
                    "tax": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "unit_price": {
                        "type": "number"
                    },
                    "unit_type": {
                        "type": "string"
                    }
                }
            },
            "BillReply": {
                "description": "Bill details",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "issue_date": {
                        "type": "string"
                    },
                    "last_status": {
                        "$ref": "#/components/schemas/BillStatusReply"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LineItemReply"
                        }
                    },
                    "number": {
                        "type": "string"
                    },
                    "pay_date": {
                        "type": "string"
                    },
                    "source": {
                        "$ref": "#/components/schemas/BillSource"
                    },
                    "status": {
                        "$ref": "#/components/schemas/BillStatus"
                    },
                    "updated_at": {
                        "type": "string"
                    },
                    "vendor_id": {
                        "type": "string"
                    },
                    "vendor_payments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VendorPaymentReply"
                        }
                    }
                }
            },
            "BillSource": {
                "description": "Bill source enum",
                "type": "string",
                "enum": [
                    "manual",
                    "quickbooks",
                    "ocr"
                ],
                "x-enum-varnames": [
                    "BillSourceManual",
                    "BillSourceQuickbooks",
                    "BillSourceOCR"
                ]
            },
            "BillStatus": {
                "description": "Bill status enum",
                "type": "string",
                "enum": [
                    "draft",
                    "needs_approval",
                    "processing",
                    "paid",
                    "deleted",
                    "failed"
                ],
                "x-enum-varnames": [
                    "BillStatusDraft",
                    "BillStatusNeedsApproval",
                    "BillStatusProcessing",
                    "BillStatusPaid",
                    "BillStatusDeleted",
                    "BillStatusFailed"
                ]
            },
            "BillStatusReply": {
                "description": "Bill status history entry",
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "reason": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/BillStatus"
                    },
                    "user_id": {
                        "type": "string"
                    }
                }
            },
            "BulkCancelItemInput": {
                "description": "Bulk cancel item",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "payment_id": {
                        "type": "string"
                    }
                }
            },
            "BulkCancelResultReply": {
                "description": "Bulk cancel per-item result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "error_reason": {
                        "type": "string"
                    },
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "BulkCancelVendorPaymentsInput": {
                "description": "Bulk vendor payment cancellation request",
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BulkCancelItemInput"
                        }
                    }
                }
            },
            "BulkCancelVendorPaymentsReply": {
                "description": "Bulk vendor payment cancellation results",
                "type": "object",
                "properties": {
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BulkCancelResultReply"
                        }
                    }
                }
            },
            "BulkDeleteBillsInput": {
                "description": "Bulk bill deletion request",
                "type": "object",
                "properties": {
                    "bill_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "BulkOperationReply": {
                "description": "Bulk operation results",
                "type": "object",
                "properties": {
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BulkResultReply"
                        }
                    }
                }
            },
            "BulkResultReply": {
                "description": "Bulk operation per-item result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "error_reason": {
                        "type": "string"
                    },
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "BulkSubmitBillsInput": {
                "description": "Bulk bill submission request",
                "type": "object",
                "properties": {
                    "bill_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "CancelVendorPaymentInput": {
                "description": "Vendor payment cancellation request",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "payment_id": {
                        "type": "string"
                    }
                }
            },
            "CancelVendorPaymentReply": {
                "description": "Vendor payment cancellation result",
                "type": "object",
                "properties": {
                    "payment_id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    }
                }
            },
            "CardFormCredentials": {
                "type": "object",
                "properties": {
                    "app_id": {
                        "type": "string"
                    },
                    "team_id": {
                        "type": "string"
                    }
                }
            },
            "ChangeDefaultResponse": {
                "description": "Change default method response",
                "type": "object",
                "properties": {
                    "response": {
                        "type": "string"
                    }
                }
            },
            "CheckoutAddressInput": {
                "description": "Billing address information",
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "state_code": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "subpremise": {
                        "type": "string"
                    }
                }
            },
            "CheckoutCAAccountData": {
                "description": "Canadian bank account data",
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "institution_code": {
                        "type": "string"
                    },
                    "transit_number": {
                        "type": "string"
                    }
                }
            },
            "CheckoutCreateBankAccountInput": {
                "description": "Create bank account payment method request body. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.",
                "type": "object",
                "properties": {
                    "account_data_type": {
                        "type": "string",
                        "enum": [
                            "us",
                            "ca"
                        ]
                    },
                    "ca_account_data": {
                        "$ref": "#/components/schemas/CheckoutCAAccountData"
                    },
                    "custom_name": {
                        "type": "string"
                    },
                    "institution_name": {
                        "type": "string"
                    },
                    "receiver_name": {
                        "type": "string"
                    },
                    "subtype": {
                        "enum": [
                            "checkings",
                            "savings"
                        ],
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/checkout_api.AccountSubtype"
                            }
                        ]
                    },
                    "type": {
                        "enum": [
                            "depository"
                        ],
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/checkout_api.AccountType"
                            }
                        ]
                    },
                    "us_account_data": {
                        "$ref": "#/components/schemas/CheckoutUSAccountData"
                    }
                }
            },
            "CheckoutCreateBankAccountResponse": {
                "description": "Create bank account response",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    }
                }
            },
            "CheckoutCreateCardCvvInput": {
                "description": "CVV registration information",
                "type": "object",
                "properties": {
                    "cvv_secret": {
                        "type": "string"
                    },
                    "provider": {
                        "enum": [
                            "evervault"
                        ],
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/checkout_api.CardProvider"
                            }
                        ]
                    }
                }
            },
            "CheckoutCreateCardCvvResponse": {
                "description": "Create card CVV response",
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "CheckoutCreateCardInput": {
                "description": "Create card payment method request body",
                "type": "object",
                "properties": {
                    "address": {
                        "$ref": "#/components/schemas/CheckoutAddressInput"
                    },
                    "card_provider_token": {
                        "type": "string"
                    },
                    "custom_name": {
                        "type": "string"
                    },
                    "provider": {
                        "enum": [
                            "evervault"
                        ],
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/checkout_api.CardProvider"
                            }
                        ]
                    }
                }
            },
            "CheckoutCreateCardResponse": {
                "description": "Create card response",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    }
                }
            },
            "CheckoutCreatePaymentInput": {
                "description": "Create payment request body",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "100.00"
                    },
                    "idempotency_key": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "payment_date": {
                        "type": "string",
                        "example": "2025-01-01T00:00:000Z"
                    },
                    "payment_method": {
                        "type": "string",
                        "enum": [
                            "card",
                            "standard_ach"
                        ]
                    },
                    "payment_method_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    }
                }
            },
            "CheckoutCreatePaymentResponse": {
                "description": "Create payment response",
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string",
                        "example": "Payment is being processed!"
                    },
                    "status": {
                        "type": "string",
                        "example": "processing"
                    }
                }
            },
            "CheckoutGetCardPaymentFeesRequest": {
                "description": "Request body for calculating card payment fees",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "100.00"
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "USD",
                            "CAD"
                        ],
                        "example": "USD"
                    }
                }
            },
            "CheckoutGetCardPaymentFeesResponse": {
                "description": "Response containing calculated payment fees for card payments",
                "type": "object",
                "properties": {
                    "fee_percentage_for_customer": {
                        "type": "string",
                        "example": "2.50"
                    },
                    "fee_percentage_for_partner": {
                        "type": "string",
                        "example": "1.50"
                    },
                    "fixed_fee_amount_customer": {
                        "type": "string",
                        "example": "0.50"
                    },
                    "fixed_fee_amount_partner": {
                        "type": "string",
                        "example": "0.25"
                    },
                    "relative_fee_amount_customer": {
                        "type": "string",
                        "example": "2.50"
                    },
                    "relative_fee_amount_partner": {
                        "type": "string",
                        "example": "1.50"
                    }
                }
            },
            "CheckoutGetPaymentMethodsReply": {
                "description": "List of payment methods response",
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CheckoutPaymentMethod"
                        }
                    }
                }
            },
            "CheckoutGetPdfLinkReply": {
                "description": "PDF link response",
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string"
                    }
                }
            },
            "CheckoutInvoiceReply": {
                "description": "Invoice response",
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "invoice_number": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "sub_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    }
                }
            },
            "CheckoutPaymentMethod": {
                "description": "Payment method information",
                "type": "object",
                "properties": {
                    "brand": {
                        "type": "string",
                        "example": "visa"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "default": {
                        "type": "boolean"
                    },
                    "exp_month": {
                        "type": "string",
                        "example": "01"
                    },
                    "exp_year": {
                        "type": "string",
                        "example": "2025"
                    },
                    "id": {
                        "type": "string"
                    },
                    "last4": {
                        "type": "string"
                    },
                    "type": {
                        "$ref": "#/components/schemas/checkout_api.MethodType"
                    }
                }
            },
            "CheckoutUSAccountData": {
                "description": "US bank account data",
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "routing_number": {
                        "type": "string"
                    }
                }
            },
            "CreateBankAccountInput": {
                "description": "Bank account information. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.",
                "type": "object",
                "properties": {
                    "account_data_type": {
                        "type": "string",
                        "enum": [
                            "us",
                            "ca"
                        ]
                    },
                    "ca_account_data": {
                        "$ref": "#/components/schemas/payment_methods_api.CAAccountData"
                    },
                    "custom_name": {
                        "type": "string"
                    },
                    "institution_name": {
                        "type": "string"
                    },
                    "receiver_name": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string",
                        "enum": [
                            "checkings",
                            "savings"
                        ]
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "depository"
                        ]
                    },
                    "us_account_data": {
                        "$ref": "#/components/schemas/payment_methods_api.USAccountData"
                    }
                }
            },
            "CreateBankAccountResponse": {
                "description": "Create bank account response",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    }
                }
            },
            "CreateBillInput": {
                "description": "Bill creation request",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "description": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "issue_date": {
                        "type": "string"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BillLineItemInput"
                        }
                    },
                    "number": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "vendor_id": {
                        "type": "string"
                    }
                }
            },
            "CreateCardCvvInput": {
                "description": "CVV registration information",
                "type": "object",
                "properties": {
                    "cvv_secret": {
                        "type": "string"
                    },
                    "product_id": {
                        "type": "string"
                    },
                    "product_type": {
                        "type": "string",
                        "enum": [
                            "invoice"
                        ]
                    },
                    "provider": {
                        "type": "string",
                        "enum": [
                            "evervault"
                        ]
                    }
                }
            },
            "CreateCardCvvResponse": {
                "description": "Create card CVV response",
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "CreateCardInput": {
                "description": "Tokenized card information",
                "type": "object",
                "properties": {
                    "address": {
                        "$ref": "#/components/schemas/AddressInput"
                    },
                    "card_provider_token": {
                        "type": "string"
                    },
                    "custom_name": {
                        "type": "string"
                    },
                    "provider": {
                        "type": "string",
                        "enum": [
                            "evervault"
                        ]
                    }
                }
            },
            "CreateCardResponse": {
                "description": "Create card response",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    }
                }
            },
            "CreateCustomerInput": {
                "description": "Customer information",
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "ein": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "external_id": {
                        "type": "string"
                    },
                    "legal_name": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "sub_premise": {
                        "type": "string"
                    }
                }
            },
            "CreateCustomerUserInput": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string"
                    },
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    }
                }
            },
            "CreateInvoiceInput": {
                "type": "object",
                "properties": {
                    "customer_id": {
                        "type": "string"
                    },
                    "due_date": {
                        "description": "Due date in YYYY-MM-DD format. If omitted, defaults to the current date from invoice creation.",
                        "type": "string",
                        "example": "2025-01-01"
                    },
                    "exclude_from_autopay": {
                        "description": "When true, this invoice is excluded from Autopay at creation time. Use this\nwhen your integration pays the invoice synchronously via API and you want to\nguarantee Autopay never charges the same invoice. Defaults to false.",
                        "type": "boolean",
                        "example": false
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/InvoiceLineItem"
                        }
                    }
                }
            },
            "CreatePaymentRequest": {
                "description": "Request body for creating a payment",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "100.00"
                    },
                    "customer_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "idempotency_key": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "invoice_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "payment_date": {
                        "type": "string",
                        "example": "2025-01-01T00:00:000Z"
                    },
                    "payment_method": {
                        "description": "@enum card,standard_ach",
                        "type": "string",
                        "enum": [
                            "card",
                            "standard_ach"
                        ]
                    },
                    "payment_method_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    }
                }
            },
            "CreateRefundRequest": {
                "description": "Request body for creating a refund",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "50.00"
                    },
                    "idempotency_key": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "payment_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "reason": {
                        "$ref": "#/components/schemas/RefundReasonDetail"
                    }
                }
            },
            "CreateVendorDataRequestReply": {
                "description": "Vendor data request creation result",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    }
                }
            },
            "CreateVendorInput": {
                "description": "Vendor creation request",
                "type": "object",
                "properties": {
                    "bank_account": {
                        "$ref": "#/components/schemas/BankAccountInput"
                    },
                    "category": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "tax_id": {
                        "type": "string"
                    }
                }
            },
            "CreateVendorPaymentInput": {
                "description": "Vendor payment creation request",
                "type": "object",
                "properties": {
                    "idempotency_key": {
                        "type": "string"
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PaymentItemInput"
                        }
                    }
                }
            },
            "CreateVendorPaymentReply": {
                "description": "Vendor payment creation results",
                "type": "object",
                "properties": {
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CreateVendorPaymentResultReply"
                        }
                    }
                }
            },
            "CreateVendorPaymentResultReply": {
                "description": "Vendor payment creation per-item result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "CustomerReply": {
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "customer_integration_id": {
                        "type": "string"
                    },
                    "default_payment_method_id": {
                        "type": "string"
                    },
                    "ein": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "external_id": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "legal_name": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "sub_premise": {
                        "type": "string"
                    }
                }
            },
            "CustomerUser": {
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "first_name": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "job_title": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    }
                }
            },
            "DeactivateVendorReply": {
                "description": "Vendor deactivation result",
                "type": "object",
                "properties": {
                    "affected_bill_count": {
                        "type": "integer"
                    },
                    "vendor_id": {
                        "type": "string"
                    }
                }
            },
            "DeleteBillReply": {
                "description": "Bill deletion result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "DeletePaymentMethodResponse": {
                "description": "Delete a payment method",
                "type": "object",
                "properties": {
                    "response": {
                        "type": "string"
                    }
                }
            },
            "ExtractedBillDataReply": {
                "description": "Extracted bill data from OCR",
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "invoice_number": {
                        "type": "string"
                    },
                    "issue_date": {
                        "type": "string"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ExtractedLineItemReply"
                        }
                    },
                    "total": {
                        "type": "number"
                    },
                    "vendor_email": {
                        "type": "string"
                    },
                    "vendor_name": {
                        "type": "string"
                    }
                }
            },
            "ExtractedLineItemReply": {
                "description": "Extracted line item from OCR",
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "unit_price": {
                        "type": "number"
                    }
                }
            },
            "GenerateTokenResponse": {
                "type": "object",
                "properties": {
                    "expires_at": {
                        "type": "integer"
                    },
                    "token": {
                        "type": "string"
                    }
                }
            },
            "GetCardPaymentFeesRequest": {
                "description": "Request body for calculating card payment fees",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "100.00"
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "USD",
                            "CAD"
                        ],
                        "example": "USD"
                    }
                }
            },
            "GetCardPaymentFeesResponse": {
                "description": "Response containing calculated payment fees for card payments",
                "type": "object",
                "properties": {
                    "fee_percentage_for_customer": {
                        "type": "string",
                        "example": "2.50"
                    },
                    "fee_percentage_for_partner": {
                        "type": "string",
                        "example": "1.50"
                    },
                    "fixed_fee_amount_customer": {
                        "type": "string",
                        "example": "0.50"
                    },
                    "fixed_fee_amount_partner": {
                        "type": "string",
                        "example": "0.25"
                    },
                    "relative_fee_amount_customer": {
                        "type": "string",
                        "example": "2.50"
                    },
                    "relative_fee_amount_partner": {
                        "type": "string",
                        "example": "1.50"
                    }
                }
            },
            "GetPaymentLinkData": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string"
                    }
                }
            },
            "GetPaymentMethodsReply": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PaymentMethod"
                        }
                    }
                }
            },
            "GetPdfLinkData": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string"
                    }
                }
            },
            "GetThemeReply": {
                "type": "object",
                "properties": {
                    "partner_name": {
                        "type": "string"
                    },
                    "theme": {
                        "$ref": "#/components/schemas/ThemePreferences"
                    }
                }
            },
            "GetTransactionsReply": {
                "type": "object",
                "properties": {
                    "payout": {
                        "$ref": "#/components/schemas/Payout"
                    },
                    "transactions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Transaction"
                        }
                    }
                }
            },
            "HttpError": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "validation_errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    }
                }
            },
            "Invoice": {
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "invoice_number": {
                        "type": "string"
                    },
                    "last_notification_at": {
                        "type": "string"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/InvoiceLineItem"
                        }
                    },
                    "memo": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "sub_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    }
                }
            },
            "InvoiceLineItem": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "description": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer"
                    }
                }
            },
            "LineItemReply": {
                "description": "Bill line item details",
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "expense_account_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "number"
                    },
                    "sequence": {
                        "type": "integer"
                    },
                    "tax": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "unit_price": {
                        "type": "number"
                    },
                    "unit_type": {
                        "type": "string"
                    }
                }
            },
            "LineItemsUpdateInput": {
                "description": "Line items update with optional replacement",
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BillLineItemInput"
                        }
                    },
                    "replace": {
                        "type": "boolean"
                    }
                }
            },
            "ListVendorDataRequestsReply": {
                "description": "List of vendor data requests",
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VendorDataRequestReply"
                        }
                    }
                }
            },
            "MethodType": {
                "type": "string",
                "enum": [
                    "card",
                    "ach"
                ],
                "x-enum-varnames": [
                    "MethodTypeCard",
                    "MethodTypeBankAccount"
                ]
            },
            "PaginatedResponse-BillReply": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BillReply"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-CustomerReply": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CustomerReply"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-CustomerUser": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CustomerUser"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-Invoice": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Invoice"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-Payment": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Payment"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-Payout": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Payout"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-RefundReply": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/RefundReply"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-VendorReply": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VendorReply"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-WebhookEvent": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEvent"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PaginatedResponse-WebhookSubscription": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookSubscription"
                        }
                    },
                    "end_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    },
                    "has_next_page": {
                        "type": "boolean",
                        "example": true
                    },
                    "has_previous_page": {
                        "type": "boolean",
                        "example": false
                    },
                    "start_cursor": {
                        "type": "string",
                        "example": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
                    }
                }
            },
            "PatchBillInput": {
                "description": "Bill patch request (partial update)",
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "description": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "issue_date": {
                        "type": "string"
                    },
                    "line_items": {
                        "$ref": "#/components/schemas/LineItemsUpdateInput"
                    },
                    "vendor_id": {
                        "type": "string"
                    }
                }
            },
            "PatchCustomerRequest": {
                "description": "Request body for patching customer information",
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string",
                        "example": "New York"
                    },
                    "country": {
                        "type": "string",
                        "example": "USA"
                    },
                    "ein": {
                        "type": "string",
                        "example": "12-3456789"
                    },
                    "legal_name": {
                        "type": "string",
                        "example": "Acme Corporation Inc."
                    },
                    "name": {
                        "type": "string",
                        "example": "Acme Corp"
                    },
                    "postal_code": {
                        "type": "string",
                        "example": "10001"
                    },
                    "state": {
                        "type": "string",
                        "example": "NY"
                    },
                    "street_address": {
                        "type": "string",
                        "example": "123 Main St, New York, NY 10001"
                    },
                    "sub_premise": {
                        "type": "string",
                        "example": "Apt 1"
                    }
                }
            },
            "PatchVendorInput": {
                "description": "Vendor patch request (partial update)",
                "type": "object",
                "properties": {
                    "category": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "tax_id": {
                        "type": "string"
                    }
                }
            },
            "Payment": {
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "string"
                    },
                    "due_date": {
                        "type": "string"
                    },
                    "fees": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PaymentFee"
                        }
                    },
                    "id": {
                        "type": "string"
                    },
                    "payment_method": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "sub_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    }
                }
            },
            "PaymentFee": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "covered_by_customer": {
                        "type": "boolean"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "description": "@enum FT_LATE_PAYMENT,FT_PRODUCT,FT_METHOD,FT_INTEREST",
                        "type": "string",
                        "enum": [
                            "FT_LATE_PAYMENT",
                            "FT_PRODUCT",
                            "FT_METHOD",
                            "FT_INTEREST"
                        ]
                    }
                }
            },
            "PaymentItemInput": {
                "description": "Payment item for vendor payment creation",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "payment_method_id": {
                        "type": "string"
                    },
                    "payment_speed": {
                        "$ref": "#/components/schemas/PaymentSpeedInput"
                    }
                }
            },
            "PaymentMethod": {
                "type": "object",
                "properties": {
                    "brand": {
                        "type": "string",
                        "example": "visa"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "default": {
                        "type": "boolean"
                    },
                    "exp_month": {
                        "type": "string",
                        "example": "01"
                    },
                    "exp_year": {
                        "type": "string",
                        "example": "2025"
                    },
                    "id": {
                        "type": "string"
                    },
                    "last4": {
                        "type": "string"
                    },
                    "type": {
                        "$ref": "#/components/schemas/MethodType"
                    }
                }
            },
            "PaymentRequest": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "redirect_url": {
                        "type": "string"
                    },
                    "reference_id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    }
                }
            },
            "PaymentRequestInput": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "string",
                        "example": "100"
                    },
                    "redirect_url": {
                        "type": "string",
                        "example": "https://example.com/redirect"
                    },
                    "reference_id": {
                        "type": "string",
                        "example": "1234567890"
                    }
                }
            },
            "PaymentSpeedEnum": {
                "description": "Payment speed enum",
                "type": "string",
                "enum": [
                    "standard",
                    "next_day",
                    "same_day",
                    "instant"
                ],
                "x-enum-varnames": [
                    "PaymentSpeedStandard",
                    "PaymentSpeedNextDay",
                    "PaymentSpeedSameDay",
                    "PaymentSpeedInstant"
                ]
            },
            "PaymentSpeedInput": {
                "description": "Payment speed enum: standard, next_day, same_day, instant",
                "type": "string",
                "enum": [
                    "standard",
                    "next_day",
                    "same_day",
                    "instant"
                ],
                "x-enum-varnames": [
                    "PaymentSpeedInputStandard",
                    "PaymentSpeedInputNextDay",
                    "PaymentSpeedInputSameDay",
                    "PaymentSpeedInputInstant"
                ]
            },
            "Payout": {
                "type": "object",
                "properties": {
                    "arrival_date": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "string"
                    },
                    "fees": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PayoutFee"
                        }
                    },
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/PayoutStatus"
                    },
                    "sub_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    }
                }
            },
            "PayoutFee": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "covered_by_customer": {
                        "type": "boolean"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "$ref": "#/components/schemas/PayoutFeeType"
                    }
                }
            },
            "PayoutFeeType": {
                "type": "string",
                "enum": [
                    "unspecified",
                    "late_payment",
                    "product",
                    "method"
                ],
                "x-enum-varnames": [
                    "PayoutFeeTypeUnspecified",
                    "PayoutFeeTypeLatePayment",
                    "PayoutFeeTypeProduct",
                    "PayoutFeeTypeMethod"
                ]
            },
            "PayoutStatus": {
                "type": "string",
                "enum": [
                    "unspecified",
                    "creating",
                    "processing",
                    "analyzing",
                    "succeeded",
                    "scheduled",
                    "approved",
                    "canceled",
                    "pending",
                    "failed"
                ],
                "x-enum-varnames": [
                    "PayoutStatusUnspecified",
                    "PayoutStatusCreating",
                    "PayoutStatusProcessing",
                    "PayoutStatusAnalyzing",
                    "PayoutStatusSucceeded",
                    "PayoutStatusScheduled",
                    "PayoutStatusApproved",
                    "PayoutStatusCanceled",
                    "PayoutStatusPending",
                    "PayoutStatusFailed"
                ]
            },
            "ReactivateVendorReply": {
                "description": "Vendor reactivation result",
                "type": "object",
                "properties": {
                    "affected_bill_count": {
                        "type": "integer"
                    },
                    "vendor_id": {
                        "type": "string"
                    }
                }
            },
            "RefundFee": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "covered_by_customer": {
                        "type": "boolean"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "description": "@enum FT_LATE_PAYMENT,FT_PRODUCT,FT_METHOD,FT_INTEREST",
                        "type": "string",
                        "enum": [
                            "FT_LATE_PAYMENT",
                            "FT_PRODUCT",
                            "FT_METHOD",
                            "FT_INTEREST"
                        ]
                    }
                }
            },
            "RefundReasonDetail": {
                "description": "The reason for the refund. If 'Other', please specify the reason in more detail.",
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "example": "Please specify the reason in more detail. Min 40 characters."
                    },
                    "type": {
                        "description": "@enum Customer Request, Duplicate, Fraud, Other",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/refunds_api.RefundType"
                            }
                        ],
                        "example": "Customer Request, Duplicate, Fraud, Other. If 'Other', please specify the reason in more detail."
                    }
                }
            },
            "RefundReply": {
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string",
                        "example": "2021-01-01T00:00:00Z"
                    },
                    "customer_id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "due_date": {
                        "type": "string",
                        "example": "2021-01-01T00:00:00Z"
                    },
                    "fees": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/RefundFee"
                        }
                    },
                    "id": {
                        "type": "string",
                        "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "payment_method": {
                        "type": "string",
                        "example": "card,standard_ach,same_day_ach,manual"
                    },
                    "sub_total": {
                        "type": "number",
                        "example": 50
                    },
                    "total": {
                        "type": "number",
                        "example": 50
                    }
                }
            },
            "RejectBillInput": {
                "description": "Bill rejection request",
                "type": "object",
                "properties": {
                    "reason": {
                        "type": "string"
                    }
                }
            },
            "RejectBillReply": {
                "description": "Bill rejection result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    }
                }
            },
            "ResendVendorDataRequestReply": {
                "description": "Data request resend confirmation",
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "RetryVendorPaymentReply": {
                "description": "Vendor payment retry result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    }
                }
            },
            "RetryWebhooksResponse": {
                "description": "Response from retrying webhooks",
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    }
                }
            },
            "SubmitBillReply": {
                "description": "Bill submission result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "success": {
                        "type": "boolean"
                    }
                }
            },
            "SubscribeWebhookInput": {
                "description": "Subscribe to a webhook",
                "type": "object",
                "properties": {
                    "endpoint_url": {
                        "type": "string"
                    },
                    "secret_key": {
                        "type": "string"
                    },
                    "topic": {
                        "$ref": "#/components/schemas/WebhookTopic"
                    }
                }
            },
            "ThemePreferences": {
                "type": "object",
                "properties": {
                    "color": {
                        "type": "string"
                    },
                    "logo_url": {
                        "type": "string"
                    }
                }
            },
            "TokenResponse": {
                "description": "OAuth2 access token response structure containing the bearer token and expiration details",
                "type": "object",
                "properties": {
                    "access_token": {
                        "description": "@Description The OAuth2 access token for API authentication - use as Bearer token in Authorization header\n@Example 580defdbe1d21e0001c67e5c2a0a6c98ba8b4a059dc5825388501574",
                        "type": "string",
                        "example": "580defdbe1d21e0001c67e5c2a0a6c98ba8b4a059dc5825388501574"
                    },
                    "expires_in": {
                        "description": "@Description Token expiration time in seconds from issuance\n@Example 3600",
                        "type": "integer",
                        "example": 3600
                    },
                    "token_type": {
                        "description": "@Description OAuth2 token type - always \"bearer\" for this implementation\n@Example bearer",
                        "type": "string",
                        "example": "bearer"
                    }
                }
            },
            "Transaction": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "direction": {
                        "$ref": "#/components/schemas/TransactionDirection"
                    },
                    "failure_reason": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "method": {
                        "$ref": "#/components/schemas/TransactionMethod"
                    },
                    "status": {
                        "$ref": "#/components/schemas/TransactionStatus"
                    },
                    "sub_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    }
                }
            },
            "TransactionDirection": {
                "type": "string",
                "enum": [
                    "credit",
                    "debit"
                ],
                "x-enum-varnames": [
                    "TransactionDirectionCredit",
                    "TransactionDirectionDebit"
                ]
            },
            "TransactionMethod": {
                "type": "string",
                "enum": [
                    "standard_ach",
                    "same_day_ach",
                    "manual",
                    "card",
                    "wire",
                    "rtp"
                ],
                "x-enum-varnames": [
                    "TransactionMethodStandardAch",
                    "TransactionMethodSameDayAch",
                    "TransactionMethodManual",
                    "TransactionMethodCard",
                    "TransactionMethodWire",
                    "TransactionMethodRtp"
                ]
            },
            "TransactionStatus": {
                "type": "string",
                "enum": [
                    "created",
                    "processing",
                    "succeeded",
                    "canceled",
                    "charged",
                    "failed",
                    "chargeback",
                    "refunded"
                ],
                "x-enum-varnames": [
                    "TransactionStatusCreated",
                    "TransactionStatusProcessing",
                    "TransactionStatusSucceeded",
                    "TransactionStatusCanceled",
                    "TransactionStatusCharged",
                    "TransactionStatusFailed",
                    "TransactionStatusChargeback",
                    "TransactionStatusRefunded"
                ]
            },
            "UpdatePayDateInput": {
                "description": "Pay date update request",
                "type": "object",
                "properties": {
                    "pay_date": {
                        "type": "string"
                    }
                }
            },
            "UpdatePayDateReply": {
                "description": "Pay date update result",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    }
                }
            },
            "UploadBillDocumentInput": {
                "description": "Bill document upload request",
                "type": "object",
                "properties": {
                    "content": {
                        "type": "string"
                    },
                    "content_type": {
                        "type": "string"
                    },
                    "filename": {
                        "type": "string"
                    }
                }
            },
            "UploadBillDocumentReply": {
                "description": "Bill upload result with OCR data",
                "type": "object",
                "properties": {
                    "bill_id": {
                        "type": "string"
                    },
                    "bill_number": {
                        "type": "string"
                    },
                    "document_path": {
                        "type": "string"
                    },
                    "extracted_data": {
                        "$ref": "#/components/schemas/ExtractedBillDataReply"
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "UploadInvoicePdfInput": {
                "description": "Invoice PDF upload request. Provide exactly one of content (base64-encoded bytes) or url (public HTTPS link to the PDF, downloaded once at upload time and stored). Either way we keep our own copy and never read the link again, so send the request again to publish an updated document.",
                "type": "object",
                "properties": {
                    "content": {
                        "description": "The PDF document as standard base64 (RFC 4648). Must decode to a valid PDF\n(the file must start with the PDF header) of at most 10 MB. Mutually\nexclusive with url.",
                        "type": "string",
                        "example": "JVBERi0xLjcKJeLjz9MK..."
                    },
                    "url": {
                        "description": "A public, absolute HTTPS link to the PDF. Fetched exactly once, at upload\ntime; we store our own copy and never read the link again — if the document\nbehind it changes, re-send this request to publish the new version. HTTP links,\nredirects to non-HTTPS locations, and links resolving to private addresses\nare rejected. The response must be a PDF of at most 10 MB. Mutually\nexclusive with content.",
                        "type": "string",
                        "example": "https://billing.example.com/invoices/INV-1042.pdf"
                    }
                }
            },
            "UploadInvoicePdfReply": {
                "type": "object",
                "properties": {
                    "path": {
                        "description": "Path is the stored location of the PDF, for both the content and url\nvariants. It is an opaque identifier, not a downloadable link — to retrieve\nthe document, call GET /invoices/{id}/pdf-link for a signed URL.",
                        "type": "string",
                        "example": "invoices/pdf/9c2f1e9a-INV-1042.pdf"
                    }
                }
            },
            "UpsertBankAccountInput": {
                "description": "Bank account upsert request",
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "account_type": {
                        "type": "string"
                    },
                    "bank_name": {
                        "type": "string"
                    },
                    "routing_number": {
                        "type": "string"
                    }
                }
            },
            "VendorDataRequestReply": {
                "description": "Vendor data request details",
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "expires_at": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "submitted_at": {
                        "type": "string"
                    },
                    "vendor_id": {
                        "type": "string"
                    }
                }
            },
            "VendorOriginEnum": {
                "description": "Vendor origin enum",
                "type": "string",
                "enum": [
                    "manual",
                    "quickbooks",
                    "ocr"
                ],
                "x-enum-varnames": [
                    "VendorOriginManual",
                    "VendorOriginQuickbooks",
                    "VendorOriginOCR"
                ]
            },
            "VendorPaymentReply": {
                "description": "Vendor payment details",
                "type": "object",
                "properties": {
                    "attempt_number": {
                        "type": "integer"
                    },
                    "estimated_arrival_date": {
                        "type": "string"
                    },
                    "failure_reason": {
                        "type": "string"
                    },
                    "hold_until": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "payment_method_id": {
                        "type": "string"
                    },
                    "payment_speed": {
                        "$ref": "#/components/schemas/PaymentSpeedEnum"
                    },
                    "sent_at": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/VendorPaymentStatusEnum"
                    }
                }
            },
            "VendorPaymentStatusEnum": {
                "description": "Vendor payment status enum",
                "type": "string",
                "enum": [
                    "hold",
                    "waiting_pay_date",
                    "ready",
                    "processing",
                    "succeeded",
                    "failed"
                ],
                "x-enum-varnames": [
                    "VendorPaymentStatusHold",
                    "VendorPaymentStatusWaitingPayDate",
                    "VendorPaymentStatusReady",
                    "VendorPaymentStatusProcessing",
                    "VendorPaymentStatusSucceeded",
                    "VendorPaymentStatusFailed"
                ]
            },
            "VendorReply": {
                "description": "Vendor details",
                "type": "object",
                "properties": {
                    "category": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "name": {
                        "type": "string"
                    },
                    "origin": {
                        "$ref": "#/components/schemas/VendorOriginEnum"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "street_address": {
                        "type": "string"
                    },
                    "tax_id": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "WebhookEvent": {
                "description": "Webhook event information",
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "idempotency_key": {
                        "type": "string"
                    },
                    "partner_id": {
                        "type": "string"
                    },
                    "payload": {},
                    "sent_at": {
                        "type": "string"
                    },
                    "sort_key": {
                        "type": "integer"
                    },
                    "status": {
                        "$ref": "#/components/schemas/WebhookEventStatus"
                    },
                    "topic": {
                        "$ref": "#/components/schemas/WebhookTopic"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "WebhookEventStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "sent",
                    "failed"
                ],
                "x-enum-varnames": [
                    "WebhookEventStatusPending",
                    "WebhookEventStatusSent",
                    "WebhookEventStatusFailed"
                ]
            },
            "WebhookSubscription": {
                "description": "Webhook subscription information",
                "type": "object",
                "properties": {
                    "created_at": {
                        "type": "string"
                    },
                    "endpoint_url": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "partner_id": {
                        "type": "string"
                    },
                    "secret_last_4_digits": {
                        "type": "string"
                    },
                    "topic": {
                        "$ref": "#/components/schemas/WebhookTopic"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "WebhookTopic": {
                "type": "string",
                "enum": [
                    "payout_paid",
                    "payout_failed",
                    "payout_processing",
                    "payout_scheduled",
                    "customer_created",
                    "customer_updated",
                    "customer_archived",
                    "payment_succeeded",
                    "payment_chargeback",
                    "payment_refunded",
                    "invoice_paid",
                    "invoice_archived",
                    "invoice_created",
                    "invoice_updated",
                    "payment_failed",
                    "payment_method_added",
                    "payment_method_deleted",
                    "default_payment_method_changed",
                    "vendor_created",
                    "vendor_updated",
                    "vendor_deactivated",
                    "vendor_reactivated",
                    "bill_created",
                    "bill_updated",
                    "bill_submitted",
                    "bill_rejected",
                    "bill_deleted",
                    "vendor_payment_processing",
                    "vendor_payment_succeeded",
                    "vendor_payment_failed",
                    "vendor_payment_canceled",
                    "vendor_data_request_submitted"
                ],
                "x-enum-varnames": [
                    "WebhookTopicPayoutPaid",
                    "WebhookTopicPayoutFailed",
                    "WebhookTopicPayoutProcessing",
                    "WebhookTopicPayoutScheduled",
                    "WebhookTopicCustomerCreated",
                    "WebhookTopicCustomerUpdated",
                    "WebhookTopicCustomerArchived",
                    "WebhookTopicPaymentSucceeded",
                    "WebhookTopicPaymentChargeback",
                    "WebhookTopicPaymentRefunded",
                    "WebhookTopicInvoicePaid",
                    "WebhookTopicInvoiceArchived",
                    "WebhookTopicInvoiceCreated",
                    "WebhookTopicInvoiceUpdated",
                    "WebhookTopicPaymentFailed",
                    "WebhookTopicPaymentMethodAdded",
                    "WebhookTopicPaymentMethodDeleted",
                    "WebhookTopicDefaultPaymentMethodChanged",
                    "WebhookTopicVendorCreated",
                    "WebhookTopicVendorUpdated",
                    "WebhookTopicVendorDeactivated",
                    "WebhookTopicVendorReactivated",
                    "WebhookTopicBillCreated",
                    "WebhookTopicBillUpdated",
                    "WebhookTopicBillSubmitted",
                    "WebhookTopicBillRejected",
                    "WebhookTopicBillDeleted",
                    "WebhookTopicVendorPaymentProcessing",
                    "WebhookTopicVendorPaymentSucceeded",
                    "WebhookTopicVendorPaymentFailed",
                    "WebhookTopicVendorPaymentCanceled",
                    "WebhookTopicVendorDataRequestSubmitted"
                ]
            },
            "address_api.AddressComponent": {
                "type": "object",
                "properties": {
                    "long_name": {
                        "type": "string"
                    },
                    "short_name": {
                        "type": "string"
                    },
                    "types": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "address_api.AddressResult": {
                "type": "object",
                "properties": {
                    "address_components": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/address_api.AddressComponent"
                        }
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "address_api.AutocompleteRequest": {
                "type": "object",
                "properties": {
                    "country": {
                        "type": "string"
                    },
                    "q": {
                        "type": "string"
                    },
                    "sessiontoken": {
                        "type": "string"
                    }
                }
            },
            "address_api.AutocompleteResponse": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/address_api.Prediction"
                        }
                    }
                }
            },
            "address_api.DetailsRequest": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "sessiontoken": {
                        "type": "string"
                    }
                }
            },
            "address_api.DetailsResponse": {
                "type": "object",
                "properties": {
                    "data": {
                        "$ref": "#/components/schemas/address_api.PlaceDetails"
                    }
                }
            },
            "address_api.PlaceDetails": {
                "type": "object",
                "properties": {
                    "result": {
                        "$ref": "#/components/schemas/address_api.AddressResult"
                    }
                }
            },
            "address_api.Prediction": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "place_id": {
                        "type": "string"
                    },
                    "structured_formatting": {
                        "$ref": "#/components/schemas/address_api.StructuredFormating"
                    }
                }
            },
            "address_api.StructuredFormating": {
                "type": "object",
                "properties": {
                    "main_text": {
                        "type": "string"
                    },
                    "secondary_text": {
                        "type": "string"
                    }
                }
            },
            "checkout_api.AccountSubtype": {
                "type": "string",
                "enum": [
                    "checkings",
                    "savings"
                ],
                "x-enum-varnames": [
                    "AccountSubtypeCheckings",
                    "AccountSubtypeSavings"
                ]
            },
            "checkout_api.AccountType": {
                "type": "string",
                "enum": [
                    "depository"
                ],
                "x-enum-varnames": [
                    "AccountTypeDepository"
                ]
            },
            "checkout_api.CardProvider": {
                "type": "string",
                "enum": [
                    "evervault"
                ],
                "x-enum-varnames": [
                    "CardProviderEvervault"
                ]
            },
            "checkout_api.MethodType": {
                "type": "string",
                "enum": [
                    "card",
                    "ach"
                ],
                "x-enum-varnames": [
                    "MethodTypeCard",
                    "MethodTypeBankAccount"
                ]
            },
            "payment_methods_api.CAAccountData": {
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "institution_code": {
                        "type": "string"
                    },
                    "transit_number": {
                        "type": "string"
                    }
                }
            },
            "payment_methods_api.USAccountData": {
                "type": "object",
                "properties": {
                    "account_number": {
                        "type": "string"
                    },
                    "routing_number": {
                        "type": "string"
                    }
                }
            },
            "refunds_api.RefundType": {
                "type": "string",
                "enum": [
                    "Customer Request",
                    "Duplicate",
                    "Fraud",
                    "Other"
                ],
                "x-enum-varnames": [
                    "RefundTypeCustomerRequest",
                    "RefundTypeDuplicate",
                    "RefundTypeFraud",
                    "RefundTypeOther"
                ]
            }
        }
    }
}