---
title: "Create an invoice"
method: POST
path: "/invoices"
tags: ["Invoices"]
---

# Create an invoice

`POST /invoices`

## Request body

- CreateInvoiceRequest — Create an invoice.
  - `invoiceNo` string — The unique number of the invoice. Acts as an idempotency key. Will be generated if not provided.
  - `customer` CustomerDetails — Customer details
    - `id` string, required — The ID of the customer
    - `name` string — The name of the customer
  - `description` string — A short description or summary of the invoice.
  - `amount` number — The invoice amount.
  - `dueDate` string, date-time — The due date for the invoice payment.
  - `issueDate` string, date-time — The date the invoice is issued.
  - `itemsTaxType` 'EXCLUSIVE' | 'INCLUSIVE' | 'NONE' — How tax is applied to line items from the invoice
  - `instalmentPlanDetails` InstalmentPlanDetails — Instalment plan details
    - `cadence` Cadence, required — The cadence of the schedule
      - `type` 'INTERVAL' | 'INTERVAL_COUNT' | 'DAY_OF_MONTH' | 'CUSTOM', required — The type of the cadence (INTERVAL, DAY_OF_MONTH, etc.)
      - `timeUnit` 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' — Required if type is INTERVAL. Defines the time unit (e.g., DAYS, MONTHS, etc.).
      - `frequency` integer — Required if type is INTERVAL. Frequency of recurrence (e.g., every N time units).
      - `dayOfMonth` integer — Required if type is DAY_OF_MONTH. Specifies the day of the month the schedule applies.
      - `dates` string[] — Required if type is CUSTOM. A list of exact custom dates for the cadence.
      - `startDate` string, date-time, required — The start date of the schedule
      - `endDate` string, date-time — The (optional) end date of the schedule
      - `count` integer — The total number of items. Required for INTERVAL_COUNT type
  - `items` NewLineItemRequest[] — The list of items included in this invoice.
    - `description` string — The description of the item.
    - `quantity` number — The quantity of items.
    - `unitAmount` number — The price per unit of the item.
    - `taxRate` number — The tax rate percentage applied on the line item amount (quantity * unit amount).
    - `taxRateId` string — Tax rate id for this line item. Use the Tax Rates API to manage your tax rates.
    - `accountCodeId` string — Sales account id for this line item. If you require specific sales accounts to be used, provide the account code id here. To recieve your account codes, contact support@adfin.com
    - `productId` string — The base product id for this line item. Use the Items catalog API to manage your products.
    - `trackingItemIds` string[] — Tracking item catalogue IDs for this line item.
  - `paymentRequests` CreatePaymentRequestDetails[] — Details for the invoice's payment requests. Only required for invoices with multiple payment requests (ex: instalments).
    - `amount` number, required — The payment request amount.
    - `payByDate` string, date-time, required — The date by which the payment request should be paid
  - `officeId` string, uuid — The unique identifier of the office associated with this invoice.

## Response `200`

The request was successful and the invoice was created.

- InvoiceResponse — Invoice response object.
  - `id` string — The internal id of the invoice
  - `invoiceNo` string — The number of the invoice. Can be empty when creating the invoice without an invoice number,but it will be automatically generated when the invoice is pushed to an accounting software. Once set, serves as a unique value that can be used as an idempotency key.
  - `description` string — Short description of the invoice
  - `totalAmount` string — The invoice total amount. Includes tax amount, amount paid or reduced with credit notes)
  - `taxAmount` string — The invoice tax amount.
  - `dueAmount` string — The invoice amount due (remaining to be paid).
  - `creditNotesAmount` string — The total amount that is credited.
  - `dueDate` string, date-time — The due date of the invoice
  - `issueDate` string, date-time — The issue date date of the invoice
  - `creationTime` string, date-time — The date the invoice was created
  - `lastUpdatedTime` string, date-time — The date the invoice was last updated
  - `paidTime` string, date-time — The date the invoice was paid
  - `status` 'DRAFT' | 'UNPAID' | 'OVERDUE' | 'SCHEDULED' | 'SUBMITTED' | 'PAID' | 'VOID' | 'SETTLED' — The invoice status
  - `statusReasonCode` 'MISSING_PAYER_CONTACT_DETAILS' | 'PENDING_ACTIVATION' | 'PENDING_DD_MANDATE' | 'PENDING_DD_CAPABILITY' | 'MARKED_AS_PAID' | 'WORKFLOW_COMPLETED' | 'NOTIFICATION_DELIVERY_FAILED' | 'BULK_PRUNE' | 'STALE_DRAFT_CLEANUP' | 'OTHER' | 'DIRECT_DEBIT_MANDATE_BANK_ACCOUNT_CHANGED' — The reason as predefined code why the invoice is in a certain status
  - `statusReason` string — Custom details on why the invoice is in a certain status
  - `invoiceSource` 'FILE_UPLOAD' | 'MANUAL' | 'PR' | 'EXTERNAL' | 'SCHEDULE' | 'PLATFORM' — The source of the invoice
  - `customer` CustomerResponse — The customer details.
    - `id` string — The Adfin id of the customer.
    - `externalId` string — The id of the customer from the platform that is integrating with Adfin.
    - `name` string — The full name of the customer.
    - `creationTime` string, date-time — The time the customer was created.
    - `lastUpdatedTime` string, date-time — The last time when the customer was updated.
    - `people` Person[] — The list of people assigned to the customer.
      - `id` string — The internal id of the person.
      - `firstName` string — The first name of the person.
      - `lastName` string — The last name of the person.
      - `email` string — The email of the person.
      - `phoneNo` string — The phone number of the person.
      - `isPrimaryContact` boolean — True if this person is a primary contact.
      - `isIncludedInCommunications` boolean — True if this person is included in the customers communications.
      - `validForEmailCommunication` boolean
      - `validForPhoneCommunication` boolean
    - `addresses` Address[] — The list of the addresses for the customer.
      - `id` string — The internal id of the address.
      - `city` string — The name of the city.
      - `postalCode` string — The postal code.
      - `country` string — The name of the biller country.
      - `addressLine1` string — The name of the street, and the house or building number.
    - `directDebitMandate` DirectDebitMandateSummary — Direct Debit details.
      - `id` string — The id of the direct debit mandate.
      - `status` 'CREATED' | 'PENDING' | 'ACTIVE' | 'PENDING_CANCELLATION' | 'CANCELLED' | 'MIGRATING' — Current status of the direct debit.
      - `statusReasonCode` 'PENDING_DD_CAPABILITY' | 'PENDING_ACTIVATION' | 'MIGRATED' | 'BANK_ACCOUNT_CHANGED' | 'INCORRECT_BANK_DETAILS' | 'INSTRUCTION_CANCELLED_BY_PAYER' | 'PAYER_DECEASED' | 'ACCOUNT_TRANSFERRED' | 'ADVANCE_NOTICE_DISPUTED' | 'AMOUNT_DISPUTED' | 'MANDATE_NOT_FOUND' | 'DISPUTE_TOO_EARLY' | 'DISPUTE_TOO_LATE' | 'INVALID_SORT_CODE' | 'INVALID_ACC_NUMBER' | 'ACCOUNT_CLOSED' | 'CANCELLED_ON_DEMAND' | 'REINSTATED' | 'MIGRATION_TIMEOUT' | 'DISCARDED_BY_BILLER' | 'ACCEPTED_ON_CREATION' | 'DEBIT_NOT_AUTHORIZED' | 'OTHER' — The reason as predefined code why the mandate is in a certain status
      - `statusReason` string — Reason explaining the current status of the direct debit mandate, especially useful for failure cases.
      - `creationTime` string, date-time — The time when the mandate was created
      - `lastUpdatedTime` string, date-time — The last time when the mandate was updated
      - `authorisationTime` string, date-time — The time when the mandate was signed by the customer
      - `submissionTime` string, date-time — The time when the mandate was submitted to the payment provider
      - `url` string — The URL where the customer can sign the direct debit mandate.
      - `bankAccountNumber` string — The bank account number associated with the mandate.
      - `mandateContactId` string — The ID of the person linked as the mandate contact
      - `distributionTime` string, date-time — The time when the mandate was first sent to the customer
      - `lastNotificationSentTime` string, date-time — The time when the mandate was last sent to the customer
    - `billerBankAccount` CustomerBankAccount — The bank account of the customer used for bank transfers
      - `accountHolderAddress` Address — The address of a biller location
        - `id` string — The internal id of the address.
        - `city` string — The name of the city.
        - `postalCode` string — The postal code.
        - `country` string — The name of the biller country.
        - `addressLine1` string — The name of the street, and the house or building number.
      - `accountHolderName` string, required — Full name of the bank account holder as registered with the bank.
      - `bankAccount` BankAccount, required
        - `accountNumber` string
        - `sortCode` string
      - `bankAddress` Address — The address of a biller location
        - `id` string — The internal id of the address.
        - `city` string — The name of the city.
        - `postalCode` string — The postal code.
        - `country` string — The name of the biller country.
        - `addressLine1` string — The name of the street, and the house or building number.
      - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWD', required — Currency of the bank account (ISO 4217).
    - `timezone` string — The timezone of the customer.
    - `discount` CustomerDiscount — The customer discount details.
      - `percentage` number — The discount as a percentage to be applied for the invoices.
      - `period` integer — The period in hours until the discount expires.
    - `externalData` CustomerExternalData[] — References about this customer from external platforms Adfin integrates with, such as ID, etc.
      - `connectorType` 'XERO' | 'QUICKBOOKS', required — The name of the platform for which this data is stored for.
      - `id` string, required — The ID of the Customer in the external platform.
      - `name` string — The name of the Customer in the external platform.
    - `tags` string[] — The tag ids associated with the customer.
    - `status` 'ACTIVE' | 'ARCHIVED' — The status of the customer (ACTIVE, ARCHIVED)
    - `statusReasonCode` 'MERGED' | 'ARCHIVED_MANUALLY' — The reason as a predefined code for why the customer is in a certain status
    - `settings` CustomerSettingsResponse — Customer settings
      - `paymentSettings` CustomerPaymentSettingsResponse — Customer payment settings
        - `allowPartialPayments` boolean — Indicates whether partial payments are allowed
        - `minPartialPaymentAmount` number — The minimum amount for partial payments
        - `surchargeIsEnabled` boolean — Indicates whether a surcharge is applied to commercial card payments
        - `lateFeesIsEnabled` boolean — Indicates whether late fees calculation is enabled
    - `trackingItems` TrackingItemCatalogueResponse[] — The tracking item catalogues associated with the customer.
      - `id` string, uuid — The id of the tracking item catalogue entry
      - `name` string — The name of the tracking item catalogue entry
      - `externalData` CatalogueExternalDataRequest[] — The external data of the tracking item catalogue entry
        - `connectorType` 'XERO' | 'QUICKBOOKS' | 'PLATFORM' — The name of the platform for which this data is stored for.
        - `externalId` string — The unique id of the item in the external platform.
      - `items` TrackingItemCatalogueResponse[] — The child tracking items (options) of this category
    - `office` InvoiceOfficeResponse — The office associated with the customer.
      - `id` string, uuid — The unique identifier of the office.
      - `name` string — The name of the office.
      - `trackingItemId` string, uuid — The tracking item identifier.
      - `details` InvoiceOfficeDetailsResponse — The office contact and address details.
        - `email` string — The office email address.
        - `addressLine1` string — The first line of the address.
        - `addressLine2` string — The second line of the address.
        - `city` string — The city.
        - `country` string — The country.
        - `postcode` string — The postcode.
    - `collectionAgentId` string, uuid — The collection agent ID associated with the customer.
  - `itemsTaxType` 'EXCLUSIVE' | 'INCLUSIVE' | 'NONE' — How tax is applied to line items from the invoice
  - `instalmentPlanDetails` InstalmentPlanDetails — Instalment plan details
    - `cadence` Cadence, required — The cadence of the schedule
      - `type` 'INTERVAL' | 'INTERVAL_COUNT' | 'DAY_OF_MONTH' | 'CUSTOM', required — The type of the cadence (INTERVAL, DAY_OF_MONTH, etc.)
      - `timeUnit` 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' — Required if type is INTERVAL. Defines the time unit (e.g., DAYS, MONTHS, etc.).
      - `frequency` integer — Required if type is INTERVAL. Frequency of recurrence (e.g., every N time units).
      - `dayOfMonth` integer — Required if type is DAY_OF_MONTH. Specifies the day of the month the schedule applies.
      - `dates` string[] — Required if type is CUSTOM. A list of exact custom dates for the cadence.
      - `startDate` string, date-time, required — The start date of the schedule
      - `endDate` string, date-time — The (optional) end date of the schedule
      - `count` integer — The total number of items. Required for INTERVAL_COUNT type
  - `items` LineItemResponse[] — The list of items from the invoice
    - `id` string — The ID of the line item to update.
    - `description` string — The description of the item.
    - `quantity` number — The quantity of items.
    - `unitAmount` number — The price per unit of the item.
    - `taxRate` number — The tax rate percentage applied on the line item amount (quantity * unit amount).
    - `taxAmount` number — The tax amount added on top of the line item amount.
    - `totalAmount` number — The total price of the item.
    - `taxDetails` TaxDetailsResponse — The tax details response.
      - `id` string — The ID of the tax rate.
      - `rate` number — The actual rate value.
    - `accountDetails` AccountDetailsResponse — The account details response.
      - `id` string — The ID of the account code.
      - `code` string — The account code value.
    - `productDetails` ProductDetailsResponse — The product details response.
      - `id` string — The ID of the product.
      - `code` string — The product code value.
    - `externalData` LineItemExternalData[] — Information about this line item captured from external systems
      - `id` string — The ID from the external platform
      - `connectorType` 'XERO' | 'QUICKBOOKS' | 'PLATFORM' — The name of the platform for which this data is stored for.
      - `templateId` string — The template ID from external platform from which this line item is created. Cannot use both the template ID and the account code.
      - `accountCode` string — The account code from external platform from which this line item is created. Cannot use both the template ID and the account code.
      - `groupLineId` string — The ID of the external platform's group line this line item is a component of. Null when the line item does not belong to a group.
    - `trackingItems` TrackingItemDetailsResponse[] — The tracking items associated with this line item.
      - `id` string — The ID of the tracking item.
      - `name` string — The name of the tracking item.
  - `paymentRequests` PaymentRequestDetails[] — The payment requests that were created for this invoice
    - `id` string — The internal id of the payment request
    - `paymentRequestNo` string — The payment request number
    - `description` string — Short description of the payment request
    - `totalAmount` number — The payment request amount
    - `principalAmount` number — The principal amount of the payment request (excluding fees and discounts)
    - `paidAmount` number — The total amount that is paid
    - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWD' — The currency in which the payment request is raised
    - `fees` FeeResponse[] — The active (non-waived) fees on this payment request.
      - `id` string, uuid — The fee id
      - `amount` number — The total fee amount
      - `dueAmount` number — The outstanding fee amount
      - `type` 'LATE_FEE' — The fee type
      - `effectiveDate` string, date-time — The date when the fee becomes effective
      - `items` FeeItemResponse[] — The fee item breakdown
        - `id` string, uuid — The fee item id
        - `type` 'DAILY_INTEREST' | 'FIXED_FEE' | 'WAIVER' — The fee item type
        - `description` string — The fee item description
        - `amount` number — The fee item amount
        - `dueAmount` number — The outstanding amount for this fee item
    - `payByDate` string, date-time — The (optional) date until when user recommended the payer to pay
    - `creationTime` string, date-time — The date the payment request was created
    - `lastNotificationSentTime` string, date-time — The date the payment request was last sent to the customer
    - `lastUpdatedTime` string, date-time — The date the payment request was last updated
    - `paidTime` string, date-time — The date the payment request paid
    - `paymentInitiationDate` string, date-time — The date when payment is initiated for this payment request (only for Direct Debit)
    - `chargeDate` string, date-time — The date on which the customer will have their account debited
    - `payoutDate` string, date-time — The date on which the biller will get paid out for the payment
    - `distributionTime` string, date-time — The date when the payment request was distributed
    - `status` 'DRAFT' | 'UNPAID' | 'OVERDUE' | 'SCHEDULED' | 'SUBMITTED' | 'PAID' | 'VOID' | 'SETTLED' — The payment request status
    - `statusReasonCode` 'MISSING_PAYER_CONTACT_DETAILS' | 'PENDING_ACTIVATION' | 'PENDING_DD_MANDATE' | 'PENDING_DD_CAPABILITY' | 'MARKED_AS_PAID' | 'WORKFLOW_COMPLETED' | 'NOTIFICATION_DELIVERY_FAILED' | 'BULK_PRUNE' | 'STALE_DRAFT_CLEANUP' | 'OTHER' | 'DIRECT_DEBIT_MANDATE_BANK_ACCOUNT_CHANGED' — The reason as predefined code why the payment request is in a certain status
    - `statusReason` string — Custom details on why the payment request is in a certain status
    - `reference` string — The payment request reference
    - `payments` PaymentAllocationResponse[] — The payments made as part of this payment request
      - `id` string, required — The ID of the payment allocation
      - `paymentId` string, required — The ID of the payment
      - `paymentRequestId` string, required — The ID of the payment request
      - `creationTime` string, date-time, required — The date when the payment was initiated
      - `lastUpdatedTime` string, date-time — The last time when the payment was updated
      - `advance` Advance — Advance details for a payment without existing payment requests
        - `customerId` string, required — The ID of the customer
        - `amount` number, required — The amount to be paid
        - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWD', required — The currency code
      - `prAllocations` PrAllocation[] — Per-payment-request allocations for this payment
        - `prId` string, uuid
        - `amount` number
        - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWD' — The default currency of the biller.
        - `splitDetails` SplitDetails
          - `billerAmount` number
          - `surchargeAmount` number
          - `fixedLateFeeAmount` number
      - `amount` number, required — The paid amount
      - `feeDetails` FeeDetails — Fee details applied to a payment
        - `amount` number — The amount of the fee
        - `applicationMethod` 'SURCHARGE' | 'LATE_FEE' — The fee application method
        - `items` FeeItemDetail[] — The fee item breakdown
          - `amount` number — The amount allocated to this fee item
          - `type` 'DAILY_INTEREST' | 'FIXED_FEE' | 'WAIVER' — The fee item type (e.g. DAILY_INTEREST, FIXED_FEE)
      - `fees` FeeDetails[] — Details about the applied fees
        - `amount` number — The amount of the fee
        - `applicationMethod` 'SURCHARGE' | 'LATE_FEE' — The fee application method
        - `items` FeeItemDetail[] — The fee item breakdown
          - `amount` number — The amount allocated to this fee item
          - `type` 'DAILY_INTEREST' | 'FIXED_FEE' | 'WAIVER' — The fee item type (e.g. DAILY_INTEREST, FIXED_FEE)
      - `status` 'PENDING' | 'SUBMITTED' | 'SENT' | 'SUCCESS' | 'CANCELLED' | 'FAILED' | 'SETTLED', required — The current payment status
      - `receiptNo` string — The current payment receipt number
      - `paymentMethod` 'BANK_PAYMENT' | 'CARD' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'DIRECT_DEBIT' | 'IMPORTED' | 'MANUAL_BANK_TRANSFER' | 'BANK_TRANSFER' | 'AMEX', required — The method used for making the payment
      - `channelPaymentId` string, required — Unique identifier for the payment in the payment provider's system
      - `channelPaymentUrl` string — The URL generated by the payment provider to perform the payment
      - `channelReferenceId` string — The remittance reference ID for bank payments
      - `externalData` PaymentExternalData[] — References about this payment from external platforms Adfin integrates with
        - `connectorType` 'XERO' | 'QUICKBOOKS' | 'PLATFORM' — The name of the platform for which this data is stored for.
        - `id` string — ID of the payment in the external platform
      - `paymentSource` 'PAYMENT_LINK' | 'GENERIC_PAYMENT_LINK' | 'PAYMENT_OVER_PHONE' — How the payment was initiated.
      - `cardOnFileId` string, uuid — The ID of the card on file the payment was taken from
      - `metadata` unknown
    - `discounts` DiscountDetails[] — The discounts applied to this payment request
      - `totalAmount` number — The discounted amount
      - `expirationDate` string, date-time — The date until when the discount is valid
    - `paymentLink` PaymentLinkDetails — Payment link details.
      - `url` string — The payment URL.
      - `lastSeenTime` string, date-time — The date when the payment link was seen for the last time
    - `distribution` DistributionDetails — Information about how a payment request is distributed and collected.
      - `collectionMethod` 'ONE_TIME_PAYMENT' | 'DIRECT_DEBIT_PAYMENT' | 'NONE' — How the payment is expected to be collected for this payment request.
      - `customMessage` string — An optional message that will be sent to the customer when the payment request is distributed.
      - `templateId` string — The schedule template id used for sending the payment request to customer.
      - `cancelCollectionOnFailure` boolean — Whether collection should be cancelled if the payment fails
    - `workflowType` 'AUTO_COLLECT' | 'ON_DEMAND' | 'NONE' — The workflow type of the payment request
    - `customFields` CustomField[] — The list of custom fields that are applied to the payment request
      - `fieldId` string — The ID of the field definition.
      - `fieldValueId` string — The ID of the specific field value.
  - `scheduleDetails` ScheduleDetails — The details about the schedule associated with a payment request
    - `scheduleId` string, required — The internal id of the schedule
    - `scheduleNo` string, required — The schedule number
    - `type` 'RECURRING' — The schedule type
  - `creditNotes` CreditNoteResponse[] — The list of credit notes from the invoice
    - `id` string — Credit note id.
    - `number` string — Credit note number.
    - `amount` number — Credit note amount.
    - `valueDate` string, date-time — Date when credit note was applied.
    - `externalData` CreditNoteExternalData[] — References about this credit note from external platforms Adfin integrates with. Such as ID etc
      - `connectorType` 'XERO' | 'QUICKBOOKS' | 'PLATFORM' — The name of the platform for which this data is stored for.
      - `id` string — ID of the Credit Note in the external platform
  - `fileSource` 'NONE' | 'FILE_UPLOAD' | 'EXTERNAL' | 'ADFIN' | 'PENDING_ADFIN' — The file source of invoice
  - `externalData` InvoiceExternalData[] — References about this invoice from external platforms Adfin integrates with. Such as ID etc
    - `connectorType` 'XERO' | 'QUICKBOOKS' | 'PLATFORM' — The name of the platform for which this data is stored for.
    - `id` string — ID of the Invoice in the external platform
    - `brandingThemeId` string — ID of the branding theme the invoice uses in the external platform, if any.
  - `creditControlStatus` 'AT_RISK' | 'EXPECTED' | 'CONFIRMED' — The credit control status of the invoice
  - `workflowType` 'AUTO_COLLECT' | 'ON_DEMAND' | 'NONE' — The workflow type of the invoice
  - `customFields` CustomField[] — The list of custom fields that are applied to the invoice
    - `fieldId` string — The ID of the field definition.
    - `fieldValueId` string — The ID of the specific field value.
  - `office` InvoiceOfficeResponse — The office associated with the customer.
    - `id` string, uuid — The unique identifier of the office.
    - `name` string — The name of the office.
    - `trackingItemId` string, uuid — The tracking item identifier.
    - `details` InvoiceOfficeDetailsResponse — The office contact and address details.
      - `email` string — The office email address.
      - `addressLine1` string — The first line of the address.
      - `addressLine2` string — The second line of the address.
      - `city` string — The city.
      - `country` string — The country.
      - `postcode` string — The postcode.

## Other responses

- `400` — A problem reading or understanding the request. Ensure that the request complies with the required format and includes all necessary parameters.
- `401` — Authentication required.
- `422` — A request validation error.
- `500` — The server could not process the request.

---

[API](https://skmtc.dev/adfin/apis/adfin-api.md) · [All operations](https://skmtc.dev/adfin/apis/adfin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adfin/adfin-api/revisions/53d29f0850e0/schema)
