> ## 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.

# Payment

A Payment is used to link an invoice or invoices with a payment transaction.

## Schema ID

`https://gobl.org/draft-0/bill/payment`

## Properties

| Title | Property | Type | Description |
| - | - | - | - |
| Tax Regime | `$regime` | [tax.RegimeCode](https://docs.gobl.org/draft-0/tax/regime_code.md) | Country code that identifies the tax regime applicable to the document. It determines which country-specific tax rules, normalizations, and validations are applied. It may be determined automatically via normalization of a supplier or issuer tax identity country code. |
| Addons | `$addons` | [tax.AddonList](https://docs.gobl.org/draft-0/tax/addon_list.md) | Keys identifying the tax addons that apply special normalization, scenarios, and validation rules to the document. |
| Tags | `$tags` | array of [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Keys that identify specific tax scenarios or requirements that may change the contents of the document or imply a specific meaning. Converters may use tags to identify situations that do not have a specific extension; for example, self-billed or partial invoices are identified by their respective tags. |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Type | `type` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Type of payment document being issued. |
| Series | `series` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Identifies groups of payments by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code with a dash (`-`) for separation. |
| Code | `code` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Sequential identifier that uniquely identifies the payment. May be left empty initially, but is **required** to **sign** the document. |
| Issue Date | `issue_date` | [cal.Date](https://docs.gobl.org/draft-0/cal/date.md) | When the payment was issued. |
| Issue Time | `issue_time` | [cal.Time](https://docs.gobl.org/draft-0/cal/time.md) | Optional time of day when the payment was issued. |
| Value Date | `value_date` | [cal.Date](https://docs.gobl.org/draft-0/cal/date.md) | When the taxes of the payment become accountable. Defaults to the issue date. |
| Currency | `currency` | [currency.Code](https://docs.gobl.org/draft-0/currency/code.md) | Currency for all payment totals. |
| Exchange Rates | `exchange_rates` | array of [currency.ExchangeRate](https://docs.gobl.org/draft-0/currency/exchange_rate.md) | Exchange rates to be used when converting the payment's monetary values into other currencies. |
| Extensions | `ext` | [tax.Extensions](https://docs.gobl.org/draft-0/tax/extensions.md) | Extensions for additional codes that may be required. |
| Preceding Details | `preceding` | array of [org.DocumentRef](https://docs.gobl.org/draft-0/org/document_ref.md) | Key information regarding previous versions of this document. |
| Supplier | `supplier` | [org.Party](https://docs.gobl.org/draft-0/org/party.md) | The taxable entity who is responsible for supplying goods or services. |
| Customer | `customer` | [org.Party](https://docs.gobl.org/draft-0/org/party.md) | Legal entity that receives the goods or services. |
| Payee | `payee` | [org.Party](https://docs.gobl.org/draft-0/org/party.md) | Legal entity that receives the payment if not the supplier. |
| Ordering | `ordering` | [bill.Ordering](https://docs.gobl.org/draft-0/bill/ordering.md) | Additional information about the ordering process, including references to other documents and alternative parties involved in the order-to-delivery process. |
| Lines | `lines` | array of [bill.PaymentLine](https://docs.gobl.org/draft-0/bill/payment_line.md) | List of documents that are being paid for. |
| Methods | `methods` | array of [pay.Record](https://docs.gobl.org/draft-0/pay/record.md) | How the payment was settled. At least one method is required; multiple may be present when the payment was split across means, for example partly card and partly cash. |
| Total | `total` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Total amount to be paid in this payment, either positive or negative according to the line types and totals. Calculated automatically. |
| Notes | `notes` | array of [org.Note](https://docs.gobl.org/draft-0/org/note.md) | Unstructured information that is relevant to the payment, such as correction or additional legal details. |
| Complements | `complements` | array of [schema.Object](https://docs.gobl.org/draft-0/schema/object.md) | Additional complementary objects that add relevant information to the payment. |
| Meta | `meta` | [cbc.Meta](https://docs.gobl.org/draft-0/cbc/meta.md) | Additional semi-structured data that doesn't fit into the body of the invoice. |

## Type Values

| Value | Description |
| - | - |
| `request` | A payment request sent from the supplier to a customer indicating that they are requesting a transfer of funds from the customer directly or a payer. This is used to request payment for specific documents and invoices. |
| `advice` | A remittance advice sent from the customer to the supplier reflecting that payment for the referenced documents has been made. |
| `receipt` | A payment receipt sent from the supplier to a customer indicating that they have received a transfer of funds from the customer directly or a payer. This is the default payment type and may be required by some tax regimes in order to communicate the payment of specific documents and invoices. |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| Payment | <ul><li>Methods sum</li></ul> | `GOBL-BILL-PAYMENT-08` Methods sum must match total |
| `type` Calculated | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-01` Payment type is required |
| `type` Calculated | <ul><li>One of \[request, advice, receipt]</li></ul> | `GOBL-BILL-PAYMENT-02` Payment type is not valid |
| `methods` | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-03` At least one payment method is required |
| `methods[*].key` | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-09` Payment method key is required |
| `methods[*].taxes` | <ul><li>Empty</li></ul> | `GOBL-BILL-PAYMENT-10` Payment method taxes are not supported |
| `methods[*].waiver` | <ul><li>Empty</li></ul> | `GOBL-BILL-PAYMENT-11` Payment method waiver is not supported |
| `issue_date` Calculated | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-04` Payment issue date is required |
| `currency` Calculated | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-05` Payment currency is required |
| `supplier` | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-06` Payment supplier is required |
| `lines` | <ul><li>Present</li></ul> | `GOBL-BILL-PAYMENT-07` Payment lines are required |


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