{
    "openapi": "3.1.0",
    "info": {
        "title": "RemindCash",
        "version": "1.0.0",
        "description": "RemindCash v1 API. Requests require a tenant-bound bearer token and an active plan."
    },
    "servers": [
        {
            "url": "https://api.remindcash.com/v1",
            "description": "Public API"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/receivables/{receivable}/pause": {
            "post": {
                "operationId": "receivables.pause",
                "tags": ["ChangeReceivableStatus"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "examples": [
                                            "Customer requested this change"
                                        ]
                                    }
                                },
                                "required": ["reason"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "paid_minor",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/receivables/{receivable}/resume": {
            "post": {
                "operationId": "receivables.resume",
                "tags": ["ChangeReceivableStatus"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "examples": [
                                            "Customer requested this change"
                                        ]
                                    }
                                },
                                "required": ["reason"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "paid_minor",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/receivables/{receivable}/cancel": {
            "post": {
                "operationId": "receivables.cancel",
                "tags": ["ChangeReceivableStatus"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "examples": [
                                            "Customer requested this change"
                                        ]
                                    }
                                },
                                "required": ["reason"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "paid_minor",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/payables": {
            "post": {
                "operationId": "payables.store",
                "tags": ["CreatePayable"],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "payable-2026-unique-key"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "bill_label": {
                                        "type": "string",
                                        "examples": ["Office rent"]
                                    },
                                    "amount": {
                                        "type": "string",
                                        "examples": ["125.00"]
                                    },
                                    "currency": {
                                        "type": "string",
                                        "examples": ["TRY"]
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "format": "date",
                                        "examples": ["2026-11-10"]
                                    },
                                    "external_reference": {
                                        "type": "string",
                                        "examples": ["BILL-2026-01"]
                                    },
                                    "description": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "bill_label",
                                    "amount",
                                    "currency",
                                    "due_date"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "bill_label": {
                                                    "type": "string"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "series_id": {
                                                    "type": ["integer", "null"]
                                                },
                                                "occurrence_index": {
                                                    "type": ["integer", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "bill_label",
                                                "amount_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "series_id",
                                                "occurrence_index",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "get": {
                "operationId": "payables.index",
                "tags": ["PayableRead"],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "bill_label": {
                                                        "type": "string"
                                                    },
                                                    "amount_minor": {
                                                        "type": "integer"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "due_date": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "external_reference": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "series_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "occurrence_index": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "version": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "bill_label",
                                                    "amount_minor",
                                                    "currency",
                                                    "due_date",
                                                    "status",
                                                    "external_reference",
                                                    "description",
                                                    "series_id",
                                                    "occurrence_index",
                                                    "version"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "meta", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/receivables": {
            "post": {
                "operationId": "receivables.store",
                "tags": ["CreateReceivable"],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "customer_id": {
                                        "type": "integer",
                                        "description": "Existing customer in this company; choose this or customer."
                                    },
                                    "customer": {
                                        "type": "object",
                                        "description": "New customer; choose this or customer_id.",
                                        "properties": {
                                            "display_name": {
                                                "type": "string"
                                            },
                                            "email": {
                                                "type": "string"
                                            },
                                            "phone_e164": {
                                                "type": "string"
                                            },
                                            "preferred_locale": {
                                                "type": "string"
                                            },
                                            "timezone": {
                                                "type": "string"
                                            }
                                        },
                                        "required": ["display_name"]
                                    },
                                    "amount": {
                                        "type": "string",
                                        "examples": ["125.00"]
                                    },
                                    "currency": {
                                        "type": "string",
                                        "examples": ["TRY"]
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "format": "date",
                                        "examples": ["2026-11-10"]
                                    },
                                    "external_reference": {
                                        "type": "string"
                                    },
                                    "description": {
                                        "type": "string"
                                    }
                                },
                                "required": ["amount", "currency", "due_date"]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "customer_id": {
                                                    "type": "integer"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "customer_id",
                                                "amount_minor",
                                                "paid_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "get": {
                "operationId": "receivables.index",
                "tags": ["ReceivableRead"],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "customer_id": {
                                                        "type": "integer"
                                                    },
                                                    "amount_minor": {
                                                        "type": "integer"
                                                    },
                                                    "paid_minor": {
                                                        "type": "integer"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "due_date": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "external_reference": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "version": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "customer_id",
                                                    "amount_minor",
                                                    "paid_minor",
                                                    "currency",
                                                    "due_date",
                                                    "status",
                                                    "external_reference",
                                                    "description",
                                                    "version"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "meta", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/payables/{payable}/mark-paid": {
            "post": {
                "operationId": "payables.mark-paid",
                "tags": ["MarkPayablePaid"],
                "parameters": [
                    {
                        "name": "payable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "examples": [
                                            "Team confirmed this bill was paid"
                                        ]
                                    }
                                },
                                "required": ["reason"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/payables/{payable}": {
            "get": {
                "operationId": "payables.show",
                "tags": ["PayableRead"],
                "parameters": [
                    {
                        "name": "payable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "bill_label": {
                                                    "type": "string"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "series_id": {
                                                    "type": ["integer", "null"]
                                                },
                                                "occurrence_index": {
                                                    "type": ["integer", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "bill_label",
                                                "amount_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "series_id",
                                                "occurrence_index",
                                                "version"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "payables.update",
                "tags": ["UpdatePayable"],
                "parameters": [
                    {
                        "name": "payable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "expected_version": {
                                        "type": "string",
                                        "description": "Version from the current GET response."
                                    },
                                    "bill_label": {
                                        "type": "string"
                                    },
                                    "amount": {
                                        "type": "string"
                                    },
                                    "currency": {
                                        "type": "string"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "format": "date"
                                    },
                                    "external_reference": {
                                        "type": ["string", "null"]
                                    },
                                    "description": {
                                        "type": ["string", "null"]
                                    }
                                },
                                "required": ["expected_version"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "bill_label": {
                                                    "type": "string"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "series_id": {
                                                    "type": ["integer", "null"]
                                                },
                                                "occurrence_index": {
                                                    "type": ["integer", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "bill_label",
                                                "amount_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "series_id",
                                                "occurrence_index",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/receivables/{receivable}": {
            "get": {
                "operationId": "receivables.show",
                "tags": ["ReceivableRead"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "customer_id": {
                                                    "type": "integer"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "customer_id",
                                                "amount_minor",
                                                "paid_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "version"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "receivables.update",
                "tags": ["UpdateReceivable"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "expected_version": {
                                        "type": "string",
                                        "description": "Version from the current GET response."
                                    },
                                    "customer_id": {
                                        "type": "integer"
                                    },
                                    "amount": {
                                        "type": "string"
                                    },
                                    "currency": {
                                        "type": "string"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "format": "date"
                                    },
                                    "external_reference": {
                                        "type": ["string", "null"]
                                    },
                                    "description": {
                                        "type": ["string", "null"]
                                    }
                                },
                                "required": ["expected_version"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "customer_id": {
                                                    "type": "integer"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "paid_minor": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "external_reference": {
                                                    "type": ["string", "null"]
                                                },
                                                "description": {
                                                    "type": ["string", "null"]
                                                },
                                                "version": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "customer_id",
                                                "amount_minor",
                                                "paid_minor",
                                                "currency",
                                                "due_date",
                                                "status",
                                                "external_reference",
                                                "description",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/receivables/{receivable}/payments": {
            "post": {
                "operationId": "receivables.payments.store",
                "tags": ["RecordReceivablePayment"],
                "parameters": [
                    {
                        "name": "receivable",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "unique-operation-key-2026"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "string",
                                        "examples": ["25.00"]
                                    }
                                },
                                "required": ["amount"]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "receivable_id": {
                                                    "type": "integer"
                                                },
                                                "amount_minor": {
                                                    "type": "integer"
                                                },
                                                "remaining_after_minor": {
                                                    "type": "integer"
                                                },
                                                "status_after": {
                                                    "type": "string"
                                                },
                                                "recorded_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "receivable_id",
                                                "amount_minor",
                                                "remaining_after_minor",
                                                "status_after",
                                                "recorded_at"
                                            ]
                                        }
                                    },
                                    "required": ["data"]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/reminder-attempts": {
            "get": {
                "operationId": "reminder-attempts.index",
                "tags": ["ReminderAttemptRead"],
                "parameters": [
                    {
                        "name": "receivable_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "attempt_no": {
                                                        "type": "integer"
                                                    },
                                                    "stage_key": {
                                                        "type": "string"
                                                    },
                                                    "channel": {
                                                        "type": "string"
                                                    },
                                                    "provider_state": {
                                                        "type": "string"
                                                    },
                                                    "delivery_status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "enum": [
                                                            "accepted",
                                                            "delivered",
                                                            "bounced",
                                                            "failed",
                                                            "sending",
                                                            "unknown",
                                                            "queued",
                                                            "cancelled",
                                                            null
                                                        ]
                                                    },
                                                    "submitted_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "resolved_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "attempt_no",
                                                    "stage_key",
                                                    "channel",
                                                    "provider_state",
                                                    "delivery_status",
                                                    "submitted_at",
                                                    "resolved_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "meta", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/usage": {
            "get": {
                "operationId": "usage.show",
                "tags": ["UsageRead"],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "as_of_utc": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "object",
                                                    "properties": {
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "source": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "period_starts_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "period_ends_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "reserved": {
                                                            "type": "integer"
                                                        },
                                                        "consumed": {
                                                            "type": "integer"
                                                        },
                                                        "remaining": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "status",
                                                        "source",
                                                        "period_starts_at",
                                                        "period_ends_at",
                                                        "limit",
                                                        "reserved",
                                                        "consumed",
                                                        "remaining"
                                                    ]
                                                },
                                                "api_requests": {
                                                    "type": "object",
                                                    "properties": {
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "period_starts_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "period_ends_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "limit": {
                                                            "type": "integer"
                                                        },
                                                        "used": {
                                                            "type": "integer"
                                                        },
                                                        "remaining": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "status",
                                                        "period_starts_at",
                                                        "period_ends_at",
                                                        "limit",
                                                        "used",
                                                        "remaining"
                                                    ]
                                                },
                                                "prepaid_credits": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "channel": {
                                                                "type": "string"
                                                            },
                                                            "currency": {
                                                                "type": "string"
                                                            },
                                                            "available_minor": {
                                                                "type": "integer"
                                                            },
                                                            "reserved_minor": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "channel",
                                                            "currency",
                                                            "available_minor",
                                                            "reserved_minor"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "as_of_utc",
                                                "email",
                                                "api_requests",
                                                "prepaid_credits"
                                            ]
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": ["data", "request_id"]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "responses": {
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": ["message"]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": ["message"]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": ["message"]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": ["message", "errors"]
                        }
                    }
                }
            }
        }
    }
}
