> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# PaymentLine

PaymentLine defines the details of a line item in a payment document.

## Schema ID

`https://gobl.org/draft-0/bill/payment#/$defs/PaymentLine`

## Properties

| Title | Property | Type | Description |
| - | - | - | - |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Index | `i` | integer | Line number within the parent document (calculated). |
| Refund | `refund` | boolean | Indicates whether this payment is a refund of a previous payment, effectively reversing the flow of funds between the supplier and customer or their representatives. |
| Document | `document` | [org.DocumentRef](https://docs.gobl.org/draft-0/org/document_ref.md) | Reference to the document being paid. |
| Installment | `installment` | integer | When making multiple payments for a single document, this specifies the installment number for this payment line. |
| Description | `description` | string | Additional human readable description of the payment line which may be useful for explaining the purpose or special conditions. Notes should be used for more formal comments. |
| Payable | `payable` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Amount of the referenced document that is payable. Calculated automatically from the embedded document's amount and converted to the currency of this document. |
| Advances | `advances` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Amount already paid in previous installments, which may be required by some tax regimes or specific use cases. |
| Amount | `amount` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Amount of the total payment allocated to the referenced document. |
| Due | `due` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Amount that still needs to be paid. |
| Tax | `tax` | [tax.Total](https://docs.gobl.org/draft-0/tax/total.md) | Breakdown of the taxes applied to this payment line after taking into account currency conversion and the relative amounts. |
| Notes | `notes` | array of [org.Note](https://docs.gobl.org/draft-0/org/note.md) | Additional notes specific to this line item for clarification purposes. |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| PaymentLine | <ul><li>Advances within payable</li></ul> | `GOBL-BILL-PAYMENTLINE-11` Advances must not exceed payable |
| PaymentLine | <ul><li>Amount within limit</li></ul> | `GOBL-BILL-PAYMENTLINE-12` Amount must not exceed payable less advances |
| `installment` | <ul><li>At least 1</li><li>At most 999</li></ul> | `GOBL-BILL-PAYMENTLINE-01` Installment must be between 1 and 999 |
| `payable` | <ul><li>Min 0</li></ul> | `GOBL-BILL-PAYMENTLINE-02` Payable must be positive |
| `advances` | <ul><li>Min 0</li></ul> | `GOBL-BILL-PAYMENTLINE-03` Advances must be zero or positive |
| `amount` | <ul><li>Min 0</li></ul> | `GOBL-BILL-PAYMENTLINE-04` Amount must be positive |
| `due` | <ul><li>Min 0</li></ul> | `GOBL-BILL-PAYMENTLINE-05` Due must be zero or positive |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.