{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/billie/main/json-schema/billie-get-invoice-response-schema.json", "title": "Get Invoice Response", "description": "Get Invoice Response", "x-generated": "2026-10-14", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/billie-direct-api-openapi.yml#/components/schemas/GetInvoiceResponse", "properties": { "uuid": { "$ref": "#/$defs/UUID" }, "invoice_number": { "description": "Customer facing merchant defined invoice number which must be unique.", "type": [ "string", "null" ] }, "duration": { "description": "The defined time allowed for payment. Measured in days.", "type": "number", "nullable": false }, "payout_amount": { "description": "The amount that will be paid out to the merchant.", "type": "number", "format": "float", "nullable": false }, "amount": { "$ref": "#/$defs/AmountDTO" }, "outstanding_amount": { "description": "The remaining amount that has to be paid by the debtor still.", "type": "number", "format": "float", "nullable": false }, "fee_amount": { "description": "The fee amount per invoice paid by the merchant to Billie.", "type": "number", "format": "float", "nullable": false }, "fee_rate": { "description": "The fee rate is the percentage that the merchant pays to Billie.", "type": "number", "format": "float", "nullable": false }, "created_at": { "description": "The date and time when the invoice was created.", "type": "string", "format": "date", "nullable": false }, "due_date": { "description": "The date when this invoice is due to be paid back.", "type": "string", "format": "date", "nullable": false }, "state": { "description": "The state of the invoice.", "type": "string", "nullable": false }, "selected_payment_method": { "type": [ "string", "null" ], "enum": [ "bank_transfer", "direct_debit" ] }, "payment_methods": { "$ref": "#/$defs/PaymentMethodCollection" } }, "type": "object", "$defs": { "AmountDTO": { "title": "object ", "description": "The amount object with split values for net, gross and tax", "required": [ "net", "gross", "tax" ], "properties": { "gross": { "description": "Value greater than 0, with max. 2 decimals. It should equal to net + tax.", "type": "number", "format": "float", "minimum": 0.01 }, "net": { "description": "Value greater than 0, with max. 2 decimals.", "type": "number", "format": "float", "minimum": 0.01 }, "tax": { "description": "Value greater than or equal to 0, with max. 2 decimals.", "type": "number", "format": "float", "minimum": 0 } }, "type": "object" }, "DateTime": { "title": "Date-Time", "type": "string", "format": "date-time" }, "PaymentMethod": { "title": "Payment Method", "properties": { "type": { "$ref": "#/$defs/PaymentMethodType" }, "data": { "description": "Payment method details", "properties": { "iban": { "$ref": "#/$defs/TinyText" }, "bic": { "$ref": "#/$defs/TinyText" }, "bank_name": { "description": "Name of the Bank entity", "type": [ "string", "null" ] }, "bank_giro": { "description": "Bank giro number (Sweden only)", "type": [ "string", "null" ] }, "sort_code": { "description": "Bank sort code (GB only)", "type": [ "string", "null" ] }, "account_number": { "description": "Bank account number (GB, NL and NO)", "type": [ "string", "null" ] }, "bank_account_owner": { "description": "Bank account owner entity", "type": "string", "nullable": false }, "mandate_reference": { "description": "Direct Debit SEPA Mandate Reference (for Direct Debit only)", "type": [ "string", "null" ] }, "mandate_execution_date": { "$ref": "#/$defs/DateTime" }, "creditor_identification": { "description": "Creditor Identification Code (for Direct Debit only)", "type": [ "string", "null" ] } }, "type": "object" } }, "type": "object" }, "PaymentMethodCollection": { "title": "Eligible Payment Methods", "type": "array", "items": { "$ref": "#/$defs/PaymentMethod" } }, "PaymentMethodType": { "title": "Payment Method Type", "type": "string", "enum": [ "bank_transfer", "direct_debit" ] }, "TinyText": { "title": "string", "type": "string", "maxLength": 255 }, "UUID": { "type": "string", "format": "uuid", "maxLength": 36, "minLength": 36 } } }