---
title: "Records a new supplier bill payment. Optionally include allocations to apply the payment against specific bills."
method: POST
path: "/api/BillPayment"
tags: ["BillPayment"]
---

# Records a new supplier bill payment. Optionally include allocations to apply the payment against specific bills.

`POST /api/BillPayment`

## Request body

- NewBillPayment — Request model for creating a new supplier bill payment.
  - `Amount` number, double — The total amount of the payment.
  - `PaymentNumber` string — Optional. If not specified will be automatically generated
  - `DateIssued` string, date-time — Date of Payment. If not specified, assumes today.
  - `TransactionPrefix` string — Optional to override the default prefix added to Payment Numbers
  - `CompanyIDFK` integer — Only required if no invoice allocations specified.
  - `ExchangeRate` number, double — Optional. Only used when the Company's currency is different from the Avaza account's base currency. Specifies the exchange rate that should apply between the Company currency and base currency. If not provided we will obtain an up to date exchange rate for the Payment Issue Date.
  - `TransactionReference` string — Optional for storing the reference # of the payment method.
  - `Notes` string — Additional notes on the payment.
  - `PaymentProviderCode` string — Optional for storing the payment provider who was the source of funds.
  - `CurrencyCode` string — Optional for specifying the Bill Payment's Currency (3 letter ISO Currency Code).
  - `PaymentAllocations` NewBillPaymentAllocation[] — List of amounts within this payment that are allocated to invoices. The sum of these be less than or equal to the payment amount.
    - `BillTransactionIDFK` integer — The Avaza Bill TransactionID that is having a payment amount allocated to it.
    - `AllocationAmount` number, double — The Amount being allocated to the bill. Expects same currency as bill currency
    - `AllocationDate` string, date-time — Optional. Defaults to the current time in the Avaza account's timezone. The date the allocation is applied to the bill. Can be different from the Payment Date when doing prepayments etc.
  - `SendWebhooks` boolean — If true, fires the bill_updated webhook event to any subscribed endpoints for each bill that was allocated against. Defaults to false to preserve existing integration behaviour.

## Response `200`

Returns the created bill payment with allocations.

- BillPayment — A payment made to a supplier, including allocations to specific bills.
  - `TransactionID` integer — Unique identifier for the payment transaction.
  - `AccountIDFK` integer — The Avaza account this payment belongs to.
  - `TransactionPrefix` string — The prefix used in the payment number.
  - `PaymentNumber` string — The full payment number including prefix.
  - `TransactionReference` string — External reference number (e.g. cheque number or bank reference).
  - `SupplierIDFK` integer — The supplier company ID this payment is made to.
  - `DateIssued` string, date-time — The date the payment was made.
  - `TransactionStatusCode` string — Current status of the payment.
  - `PaymentProviderCode` string — Code identifying the payment provider/method used.
  - `ExchangeRate` number, double — Exchange rate to the account's base currency.
  - `Balance` number, double — Unallocated balance remaining on the payment.
  - `CurrencyCode` string — ISO 3-character currency code for the payment.
  - `TotalAmount` number, double — Total payment amount.
  - `Notes` string — Additional notes on the payment.
  - `DateCreated` string, date-time — Date and time the record was created.
  - `DateUpdated` string, date-time — Date and time the record was last updated.
  - `PaymentAllocations` BillPaymentAllocation[] — List of allocations applying this payment to specific bills.
    - `TransactionAllocationID` integer — Unique identifier for this payment allocation.
    - `BillTransactionIDFK` integer — The bill Transaction ID this payment is allocated against.
    - `PaymentTransactionIDFK` integer — The payment Transaction ID this allocation belongs to.
    - `AllocationDate` string, date-time — The date this allocation was applied.
    - `AllocationAmount` number, double — The amount allocated from the payment to the bill.
  - `ViewBillPaymentURL` string — URL to view this bill payment in the Avaza web application.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/revisions/1eeadf750514/schema)
