> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Create invoice

POST https://api-sandbox.payabli.com/api/Invoice/{entry}
Content-Type: application/json

Creates an invoice in an entrypoint.

Reference: https://docs.payabli.com/developers/api-reference/invoice/add-invoice

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi-oas
  version: 1.0.0
paths:
  /Invoice/{entry}:
    post:
      operationId: AddInvoice
      summary: Add invoice
      description: Creates an invoice in an entrypoint.
      tags:
        - Invoice
      parameters:
        - name: entry
          in: path
          description: >-
            The paypoint's entrypoint identifier. [Learn
            more](/developers/api-reference/api-overview#entrypoint-vs-entry)
          required: true
          schema:
            type: string
        - name: forceCustomerCreation
          in: query
          description: >-
            When `true`, the request creates a new customer record, regardless
            of whether customer identifiers match an existing customer. Defaults
            to `false`.
          required: false
          schema:
            $ref: '#/components/schemas/ForceCustomerCreation'
        - name: requestToken
          in: header
          description: >
            Long-lived API token sent in the `requestToken` header. See [API
            token authentication](/developers/api-tokens).
          required: true
          schema:
            type: string
        - name: idempotencyKey
          in: header
          description: >-
            _Optional but recommended_ A unique ID that you can include to
            prevent duplicating objects or transactions in the case that a
            request is sent more than once. This key isn't generated in Payabli,
            you must generate it yourself. This key persists for 2 minutes.
            After 2 minutes, you can reuse the key if needed.
          required: false
          schema:
            $ref: '#/components/schemas/IdempotencyKey'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceResponseWithoutData'
        '400':
          description: Bad request / invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '503':
          description: Database connection error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceDataRequest'
servers:
  - url: https://api-sandbox.payabli.com/api
    description: Sandbox
  - url: https://api.payabli.com/api
    description: Production
components:
  schemas:
    ForceCustomerCreation:
      type: boolean
      description: |
        When `true`, the request creates a new customer record, regardless of
        whether customer identifiers match an existing customer. Defaults to
        `false`.
      title: ForceCustomerCreation
    IdempotencyKey:
      type: string
      description: >
        _Optional but recommended._ A unique ID that you can include to prevent

        duplicating objects or transactions in the case that a request is sent

        more than once. This key isn't generated in Payabli; you must generate
        it

        yourself. The key persists for 2 minutes. After 2 minutes, you can reuse

        the key if needed.
      title: IdempotencyKey
    AdditionalData:
      type: object
      additionalProperties:
        type: object
        additionalProperties:
          description: Any type
      description: >
        Custom dictionary of key:value pairs. You can use this field to store
        any

        data related to the object or for your system. If you are using

        [custom identifiers](/developers/developer-guides/entities-customers),

        pass those in this object. Max length for a value is 100 characters.

        Example usage:


        ```json

        {
          "additionalData": {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3"
          }
        }

        ```
      title: AdditionalData
    BillingAddressNullable:
      type: string
      description: Billing address.
      title: BillingAddressNullable
    BillingAddressAddtlNullable:
      type: string
      description: Additional line for the billing address.
      title: BillingAddressAddtlNullable
    BillingCityNullable:
      type: string
      description: Billing city.
      title: BillingCityNullable
    BillingCountryNullable:
      type: string
      description: Billing address country.
      title: BillingCountryNullable
    Email:
      type: string
      format: email
      description: Email address.
      title: Email
    PhoneNumber:
      type: string
      description: Phone number.
      title: PhoneNumber
    BillingStateNullable:
      type: string
      description: Billing state. Must be a 2-letter state code for addresses in the US.
      title: BillingStateNullable
    BillingZip:
      type: string
      description: Billing address ZIP code.
      title: BillingZip
    CustomerId:
      type: integer
      format: int64
      description: The Payabli-generated unique ID for the customer.
      title: CustomerId
    CustomerNumberNullable:
      type: string
      description: |
        User-provided unique identifier for the customer. This is typically the
        customer ID from your own system.
      title: CustomerNumberNullable
    Identifierfields:
      type: array
      items:
        type: string
      description: >-
        List of fields acting as customer identifiers, to be used instead of
        CustomerNumber.
      title: Identifierfields
    Shippingaddress:
      type: string
      description: The shipping address.
      title: Shippingaddress
    Shippingaddressadditional:
      type: string
      description: Additional line for shipping address.
      title: Shippingaddressadditional
    Shippingcity:
      type: string
      description: Shipping city.
      title: Shippingcity
    Shippingcountry:
      type: string
      description: Shipping address country.
      title: Shippingcountry
    Shippingstate:
      type: string
      description: Shipping state or province.
      title: Shippingstate
    Shippingzip:
      type: string
      description: |
        Shipping ZIP code. For Pay In functions, this field supports 5-digit
        and 9-digit ZIP codes and alphanumeric Canadian postal codes. For
        example: `37615-1234` or `37615`.
      title: Shippingzip
    PayorDataRequest:
      type: object
      properties:
        additionalData:
          $ref: '#/components/schemas/AdditionalData'
        billingAddress1:
          $ref: '#/components/schemas/BillingAddressNullable'
        billingAddress2:
          $ref: '#/components/schemas/BillingAddressAddtlNullable'
        billingCity:
          $ref: '#/components/schemas/BillingCityNullable'
        billingCountry:
          $ref: '#/components/schemas/BillingCountryNullable'
        billingEmail:
          $ref: '#/components/schemas/Email'
        billingPhone:
          $ref: '#/components/schemas/PhoneNumber'
        billingState:
          $ref: '#/components/schemas/BillingStateNullable'
        billingZip:
          $ref: '#/components/schemas/BillingZip'
          description: >-
            Customer's billing ZIP code. For Pay In functions, this field
            supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian
            postal codes. For example: "37615-1234" or "37615".
        company:
          type: string
          description: Customer's company name.
        customerId:
          $ref: '#/components/schemas/CustomerId'
        customerNumber:
          $ref: '#/components/schemas/CustomerNumberNullable'
        firstName:
          type: string
          description: Customer/Payor first name.
        identifierFields:
          $ref: '#/components/schemas/Identifierfields'
        lastName:
          type: string
          description: Customer/Payor last name.
        shippingAddress1:
          $ref: '#/components/schemas/Shippingaddress'
        shippingAddress2:
          $ref: '#/components/schemas/Shippingaddressadditional'
        shippingCity:
          $ref: '#/components/schemas/Shippingcity'
        shippingCountry:
          $ref: '#/components/schemas/Shippingcountry'
        shippingState:
          $ref: '#/components/schemas/Shippingstate'
        shippingZip:
          $ref: '#/components/schemas/Shippingzip'
      description: >-
        Customer information. May be required, depending on the paypoint's
        settings. Required for subscriptions.
      title: PayorDataRequest
    AdditionalDataMap:
      type: object
      additionalProperties:
        type: string
      description: >
        Custom dictionary of key:value pairs. You can use this field to store
        any

        data related to the object or for your system. If you are using

        [custom identifiers](/developers/developer-guides/entities-customers),

        pass those in this object. Max length for a value is 100 characters.


        ```json

        {
          "additionalData": {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3"
          }
        }

        ```
      title: AdditionalDataMap
    FileContentFtype:
      type: string
      enum:
        - pdf
        - doc
        - docx
        - jpg
        - jpeg
        - png
        - gif
        - txt
      description: The MIME type of the file (if content is provided).
      title: FileContentFtype
    FileContent:
      type: object
      properties:
        fContent:
          type: string
          description: |
            Content of file, Base64-encoded. Ignored if `furl` is specified. Max
            upload size is 30 MB.
        filename:
          type: string
          description: The name of the attached file.
        ftype:
          $ref: '#/components/schemas/FileContentFtype'
        furl:
          type: string
          description: Optional URL provided to show or download the file remotely.
      description: Contains details about a file. Max upload size is 30 MB.
      title: FileContent
    Attachments:
      type: array
      items:
        $ref: '#/components/schemas/FileContent'
      description: >
        Array of `fileContent` objects with attached documents. Max upload size
        is

        30 MB.
      title: Attachments
    Discount:
      type: number
      format: double
      description: Discount applied to the invoice.
      title: Discount
    DutyAmount:
      type: number
      format: double
      description: Duty amount.
      title: DutyAmount
    FreightAmount:
      type: number
      format: double
      description: Freight/shipping amount.
      title: FreightAmount
    Frequency:
      type: string
      enum:
        - onetime
        - weekly
        - every2weeks
        - every6months
        - monthly
        - every3months
        - annually
        - firstofmonth
        - fifteenthofmonth
        - endofmonth
      description: >
        Frequency for operation. The `firstofmonth`, `fifteenthofmonth`, and
        `endofmonth` values are only valid on subscriptions — they aren't
        accepted by other endpoints (such as invoice scheduling) that use this
        enum.
      title: Frequency
    InvoiceAmount:
      type: number
      format: double
      description: The invoice amount.
      title: InvoiceAmount
    InvoiceNumber:
      type: string
      description: Invoice number. Identifies the invoice under a paypoint.
      title: InvoiceNumber
    Invoicestatus:
      type: integer
      description: Invoice status code.
      title: Invoicestatus
    InvoiceType:
      type: integer
      description: |
        Invoice type. Value `0` is for single/one-time invoices, `1` for
        scheduled invoices.
      title: InvoiceType
    ItemCommodityCode:
      type: string
      description: Item or product commodity code. Max length of 250 characters.
      title: ItemCommodityCode
    ItemDescription:
      type: string
      description: Item or product description. Max length of 250 characters.
      title: ItemDescription
    ItemProductCode:
      type: string
      description: Item or product code. Max length of 250 characters.
      title: ItemProductCode
    ItemProductName:
      type: string
      description: Item or product name. Max length of 250 characters.
      title: ItemProductName
    ItemUnitofMeasure:
      type: string
      description: Unit of measurement. Max length of 100 characters.
      title: ItemUnitofMeasure
    BillItem:
      type: object
      properties:
        itemCategories:
          type: array
          items:
            type: string
          description: Array of tags classifying item or product.
        itemCommodityCode:
          $ref: '#/components/schemas/ItemCommodityCode'
        itemCost:
          type: number
          format: double
          description: Item or product price per unit.
        itemDescription:
          $ref: '#/components/schemas/ItemDescription'
        itemMode:
          type: integer
          description: >
            Internal class of item or product: value `0` is only for invoices,

            `1` for bills, and `2` is common for both. Required on invoice line

            items — invoice creation fails with `Invalid item data` if it's
            omitted.
        itemProductCode:
          $ref: '#/components/schemas/ItemProductCode'
        itemProductName:
          $ref: '#/components/schemas/ItemProductName'
        itemQty:
          type: integer
          description: Quantity of item or product.
        itemTaxAmount:
          type: number
          format: double
          description: Tax amount applied to item or product.
        itemTaxRate:
          type: number
          format: double
          description: Tax rate applied to item or product.
        itemTotalAmount:
          type: number
          format: double
          description: >
            Per-line total for this item (unit cost times quantity). Distinct
            from

            the invoice's overall total, `invoiceAmount`. Required on invoice
            line items.
        itemUnitOfMeasure:
          $ref: '#/components/schemas/ItemUnitofMeasure'
      title: BillItem
    BillDataPaymentTerms:
      type: string
      enum:
        - PIA
        - CIA
        - UR
        - NET10
        - NET20
        - NET30
        - NET45
        - NET60
        - NET90
        - EOM
        - MFI
        - 5MFI
        - 10MFI
        - 15MFI
        - 20MFI
        - 2/10NET30
        - UF
        - 10UF
        - 20UF
        - 25UF
        - 50UF
      description: >
        Payment terms for invoice. If no terms are defined, then response data
        for

        this field defaults to `NET30`. Mirrors the values in

        [`Terms`](#schema-terms).
      title: BillDataPaymentTerms
    PurchaseOrder:
      type: string
      description: Purchase order number.
      title: PurchaseOrder
    ShippingFromZip:
      type: string
      description: Sender shipping ZIP code.
      title: ShippingFromZip
    SummaryCommodityCode:
      type: string
      description: Commodity code.
      title: SummaryCommodityCode
    Tax:
      type: number
      format: double
      description: Tax rate in percent applied to the invoice.
      title: Tax
    TermsConditions:
      type: string
      description: Custom terms and conditions included in the invoice.
      title: TermsConditions
    BillData:
      type: object
      properties:
        AdditionalData:
          $ref: '#/components/schemas/AdditionalDataMap'
        attachments:
          $ref: '#/components/schemas/Attachments'
        company:
          type: string
          description: Company name of the recipient of the invoice.
        discount:
          $ref: '#/components/schemas/Discount'
        dutyAmount:
          $ref: '#/components/schemas/DutyAmount'
        firstName:
          type: string
          description: First name of the recipient of the invoice.
        freightAmount:
          $ref: '#/components/schemas/FreightAmount'
        frequency:
          $ref: '#/components/schemas/Frequency'
          description: Frequency of scheduled invoice.
        invoiceAmount:
          $ref: '#/components/schemas/InvoiceAmount'
        invoiceDate:
          type: string
          format: date
          description: 'Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.'
        invoiceDueDate:
          type: string
          format: date
          description: >-
            Invoice due date in one of the accepted formats: YYYY-MM-DD,
            MM/DD/YYYY.
        invoiceEndDate:
          type: string
          format: date
          description: >-
            Indicate the date to finish a scheduled invoice cycle
            (`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD,
            MM/DD/YYYY.
        invoiceNumber:
          $ref: '#/components/schemas/InvoiceNumber'
          description: Invoice number. Identifies the invoice under a paypoint.
        invoiceStatus:
          $ref: '#/components/schemas/Invoicestatus'
        invoiceType:
          $ref: '#/components/schemas/InvoiceType'
        items:
          type: array
          items:
            $ref: '#/components/schemas/BillItem'
          description: Array of line items included in the invoice.
        lastName:
          type: string
          description: Last name of the recipient of the invoice.
        notes:
          type: string
          description: Notes included in the invoice.
        paymentTerms:
          $ref: '#/components/schemas/BillDataPaymentTerms'
        purchaseOrder:
          $ref: '#/components/schemas/PurchaseOrder'
        shippingAddress1:
          $ref: '#/components/schemas/Shippingaddress'
        shippingAddress2:
          $ref: '#/components/schemas/Shippingaddressadditional'
        shippingCity:
          $ref: '#/components/schemas/Shippingcity'
        shippingCountry:
          $ref: '#/components/schemas/Shippingcountry'
        shippingEmail:
          $ref: '#/components/schemas/Email'
          description: Shipping recipient's contact email address.
        shippingFromZip:
          $ref: '#/components/schemas/ShippingFromZip'
        shippingPhone:
          type: string
          description: Recipient phone number.
        shippingState:
          $ref: '#/components/schemas/Shippingstate'
        shippingZip:
          $ref: '#/components/schemas/Shippingzip'
        summaryCommodityCode:
          $ref: '#/components/schemas/SummaryCommodityCode'
        tax:
          $ref: '#/components/schemas/Tax'
        termsConditions:
          $ref: '#/components/schemas/TermsConditions'
      title: BillData
    BillOptions:
      type: object
      properties:
        includePaylink:
          type: boolean
          description: Flag to indicate if the scheduled invoice includes a payment link.
        includePdf:
          type: boolean
          description: >-
            Flag to indicate if the scheduled invoice includes a PDF version of
            invoice
      title: BillOptions
    InvoiceDataRequest:
      type: object
      properties:
        customerData:
          $ref: '#/components/schemas/PayorDataRequest'
          description: >-
            Object describing the customer/payor. Required for POST requests.
            Which fields are required depends on the paypoint's custom
            identifier settings.
        invoiceData:
          $ref: '#/components/schemas/BillData'
          description: Object describing the invoice. Required for POST requests.
        scheduledOptions:
          $ref: '#/components/schemas/BillOptions'
          description: Object with options for scheduled invoices.
      title: InvoiceDataRequest
    IsSuccess:
      type: boolean
      description: |
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    Responsecode:
      type: integer
      description: |
        Code for the response. Learn more in
        [API Response Codes](/developers/api-reference/api-responses).
      title: Responsecode
    Responsedatanonobject:
      oneOf:
        - type: string
        - type: integer
      description: The response data.
      title: Responsedatanonobject
    ResponseText:
      type: string
      description: |
        Response text for operation: 'Success' or 'Declined'.
      title: ResponseText
    PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    RoomIdNotInUse:
      type: integer
      format: int64
      description: Field not in use on this endpoint. It always returns `0`.
      title: RoomIdNotInUse
    InvoiceResponseWithoutData:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/IsSuccess'
        responseCode:
          $ref: '#/components/schemas/Responsecode'
        responseData:
          $ref: '#/components/schemas/Responsedatanonobject'
          description: >-
            If `isSuccess` = true, this contains the identifier of the invoice.
            If `isSuccess` = false, this contains the reason for the failure.
        responseText:
          $ref: '#/components/schemas/ResponseText'
        pageidentifier:
          oneOf:
            - $ref: '#/components/schemas/PageIdentifier'
            - type: 'null'
        roomId:
          $ref: '#/components/schemas/RoomIdNotInUse'
      required:
        - isSuccess
        - responseCode
        - responseData
        - responseText
        - pageidentifier
        - roomId
      description: Response schema for invoice operations.
      title: InvoiceResponseWithoutData
    PayabliErrorBodyResponseData:
      type: object
      properties:
        explanation:
          type: string
          description: Human-readable explanation of what happened.
        todoAction:
          type: string
          description: Suggested resolution.
      description: Object with detailed error context.
      title: PayabliErrorBodyResponseData
    PayabliErrorBody:
      type: object
      properties:
        isSuccess:
          type: boolean
          description: Always `false` for error responses.
        responseCode:
          type: integer
          description: |
            Code for the response. Learn more in
            [API Response Codes](/developers/api-reference/api-responses).
        responseText:
          type: string
          description: Error text describing what went wrong.
        responseData:
          $ref: '#/components/schemas/PayabliErrorBodyResponseData'
          description: Object with detailed error context.
      required:
        - isSuccess
        - responseText
      description: |
        Shape returned by every Payabli API error response. The `responseData`
        object carries human-readable error context.
      title: PayabliErrorBody
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      in: header
      name: requestToken
      description: >
        Long-lived API token sent in the `requestToken` header. See [API token
        authentication](/developers/api-tokens).
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        OAuth2 Bearer access token from the client-credentials flow. See [OAuth
        authentication](/developers/oauth-authentication).

```

## Examples



**Request**

```json
{
  "customerData": {
    "customerNumber": "C-90010",
    "firstName": "Tamara",
    "lastName": "Bagratoni"
  },
  "invoiceData": {
    "discount": 10,
    "frequency": "onetime",
    "invoiceAmount": 1082.37,
    "invoiceDate": "2025-10-19",
    "invoiceNumber": "INV-2345",
    "invoiceStatus": 1,
    "invoiceType": 0,
    "items": [
      {
        "itemCost": 100,
        "itemDescription": "Consultation for Georgian tours",
        "itemMode": 2,
        "itemProductName": "Adventure Consult",
        "itemQty": 2,
        "itemTotalAmount": 200
      },
      {
        "itemCost": 882.37,
        "itemDescription": "Deposit for trip planning",
        "itemMode": 2,
        "itemProductName": "Deposit ",
        "itemQty": 1,
        "itemTotalAmount": 882.37
      }
    ]
  }
}
```

**Response**

```json
{
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 3625,
  "responseText": "Success",
  "pageidentifier": null,
  "roomId": 0
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.invoice.addInvoice("8cfec329267", {
        body: {
            customerData: {
                customerNumber: "C-90010",
                firstName: "Tamara",
                lastName: "Bagratoni",
            },
            invoiceData: {
                discount: 10,
                frequency: "onetime",
                invoiceAmount: 1082.37,
                invoiceDate: "2025-10-19",
                invoiceNumber: "INV-2345",
                invoiceStatus: 1,
                invoiceType: 0,
                items: [
                    {
                        itemCost: 100,
                        itemDescription: "Consultation for Georgian tours",
                        itemMode: 2,
                        itemProductName: "Adventure Consult",
                        itemQty: 2,
                        itemTotalAmount: 200,
                    },
                    {
                        itemCost: 882.37,
                        itemDescription: "Deposit for trip planning",
                        itemMode: 2,
                        itemProductName: "Deposit ",
                        itemQty: 1,
                        itemTotalAmount: 882.37,
                    },
                ],
            },
        },
    });
}
main();

```

```python
from payabli import payabli, PayorDataRequest, BillData, BillItem
import datetime

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.invoice.add_invoice(
    entry="8cfec329267",
    customer_data=PayorDataRequest(
        customer_number="C-90010",
        first_name="Tamara",
        last_name="Bagratoni",
    ),
    invoice_data=BillData(
        discount=10,
        frequency="onetime",
        invoice_amount=1082.37,
        invoice_date=datetime.date.fromisoformat("2025-10-19"),
        invoice_number="INV-2345",
        invoice_status=1,
        invoice_type=0,
        items=[
            BillItem(
                item_cost=100,
                item_description="Consultation for Georgian tours",
                item_mode=2,
                item_product_name="Adventure Consult",
                item_qty=2,
                item_total_amount=200,
            ),
            BillItem(
                item_cost=882.37,
                item_description="Deposit for trip planning",
                item_mode=2,
                item_product_name="Deposit ",
                item_qty=1,
                item_total_amount=882.37,
            )
        ],
    ),
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiOasClient;
import io.github.payabli.api.resources.invoice.requests.AddInvoiceRequest;
import io.github.payabli.api.types.BillData;
import io.github.payabli.api.types.BillItem;
import io.github.payabli.api.types.Frequency;
import io.github.payabli.api.types.InvoiceDataRequest;
import io.github.payabli.api.types.PayorDataRequest;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiOasClient client = PayabliPayabliApiOasClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.invoice().addInvoice(
            "8cfec329267",
            AddInvoiceRequest
                .builder()
                .body(
                    InvoiceDataRequest
                        .builder()
                        .customerData(
                            PayorDataRequest
                                .builder()
                                .customerNumber("C-90010")
                                .firstName("Tamara")
                                .lastName("Bagratoni")
                                .build()
                        )
                        .invoiceData(
                            BillData
                                .builder()
                                .discount(10.0)
                                .frequency(Frequency.ONE_TIME)
                                .invoiceAmount(1082.37)
                                .invoiceDate("2025-10-19")
                                .invoiceNumber("INV-2345")
                                .invoiceStatus(1)
                                .invoiceType(0)
                                .items(
                                    Optional.of(
                                        Arrays.asList(
                                            BillItem
                                                .builder()
                                                .itemCost(100.0)
                                                .itemDescription("Consultation for Georgian tours")
                                                .itemMode(2)
                                                .itemProductName("Adventure Consult")
                                                .itemQty(2)
                                                .itemTotalAmount(200.0)
                                                .build(),
                                            BillItem
                                                .builder()
                                                .itemCost(882.37)
                                                .itemDescription("Deposit for trip planning")
                                                .itemMode(2)
                                                .itemProductName("Deposit ")
                                                .itemQty(1)
                                                .itemTotalAmount(882.37)
                                                .build()
                                        )
                                    )
                                )
                                .build()
                        )
                        .build()
                )
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.invoice.add_invoice(
  entry: "8cfec329267",
  customer_data: {
    customer_number: "C-90010",
    first_name: "Tamara",
    last_name: "Bagratoni"
  },
  invoice_data: {
    discount: 10,
    frequency: "onetime",
    invoice_amount: 1082.37,
    invoice_date: "2025-10-19",
    invoice_number: "INV-2345",
    invoice_status: 1,
    invoice_type: 0,
    items: [{
      item_cost: 100,
      item_description: "Consultation for Georgian tours",
      item_mode: 2,
      item_product_name: "Adventure Consult",
      item_qty: 2,
      item_total_amount: 200
    }, {
      item_cost: 882.37,
      item_description: "Deposit for trip planning",
      item_mode: 2,
      item_product_name: "Deposit ",
      item_qty: 1,
      item_total_amount: 882.37
    }]
  }
)

```

```csharp
using PayabliPayabliApiOas;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiOasClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Invoice.AddInvoiceAsync(
            "8cfec329267",
            new AddInvoiceRequest {
                Body = new InvoiceDataRequest {
                    CustomerData = new PayorDataRequest {
                        CustomerNumber = "C-90010",
                        FirstName = "Tamara",
                        LastName = "Bagratoni"
                    },
                    InvoiceData = new BillData {
                        Discount = 10,
                        Frequency = Frequency.OneTime,
                        InvoiceAmount = 1082.37,
                        InvoiceDate = DateOnly.Parse("2025-10-19"),
                        InvoiceNumber = "INV-2345",
                        InvoiceStatus = 1,
                        InvoiceType = 0,
                        Items = new List<BillItem>(){
                            new BillItem {
                                ItemCost = 100,
                                ItemDescription = "Consultation for Georgian tours",
                                ItemMode = 2,
                                ItemProductName = "Adventure Consult",
                                ItemQty = 2,
                                ItemTotalAmount = 200
                            },
                            new BillItem {
                                ItemCost = 882.37,
                                ItemDescription = "Deposit for trip planning",
                                ItemMode = 2,
                                ItemProductName = "Deposit ",
                                ItemQty = 1,
                                ItemTotalAmount = 882.37
                            },
                        }

                    }
                }
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.AddInvoiceRequest{
        Body: &payabli.InvoiceDataRequest{
            CustomerData: &payabli.PayorDataRequest{
                CustomerNumber: payabli.String(
                    "C-90010",
                ),
                FirstName: payabli.String(
                    "Tamara",
                ),
                LastName: payabli.String(
                    "Bagratoni",
                ),
            },
            InvoiceData: &payabli.BillData{
                Discount: payabli.Float64(
                    10,
                ),
                Frequency: payabli.FrequencyOneTime.Ptr(),
                InvoiceAmount: payabli.Float64(
                    1082.37,
                ),
                InvoiceDate: payabli.Time(
                    payabli.MustParseDate(
                        "2025-10-19",
                    ),
                ),
                InvoiceNumber: payabli.String(
                    "INV-2345",
                ),
                InvoiceStatus: payabli.Int(
                    1,
                ),
                InvoiceType: payabli.Int(
                    0,
                ),
                Items: []*payabli.BillItem{
                    &payabli.BillItem{
                        ItemCost: payabli.Float64(
                            100,
                        ),
                        ItemDescription: payabli.String(
                            "Consultation for Georgian tours",
                        ),
                        ItemMode: payabli.Int(
                            2,
                        ),
                        ItemProductName: payabli.String(
                            "Adventure Consult",
                        ),
                        ItemQty: payabli.Int(
                            2,
                        ),
                        ItemTotalAmount: payabli.Float64(
                            200,
                        ),
                    },
                    &payabli.BillItem{
                        ItemCost: payabli.Float64(
                            882.37,
                        ),
                        ItemDescription: payabli.String(
                            "Deposit for trip planning",
                        ),
                        ItemMode: payabli.Int(
                            2,
                        ),
                        ItemProductName: payabli.String(
                            "Deposit ",
                        ),
                        ItemQty: payabli.Int(
                            1,
                        ),
                        ItemTotalAmount: payabli.Float64(
                            882.37,
                        ),
                    },
                },
            },
        },
    }
    client.Invoice.AddInvoice(
        context.TODO(),
        "8cfec329267",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Invoice\Requests\AddInvoiceRequest;
use Payabli\Types\InvoiceDataRequest;
use Payabli\Types\PayorDataRequest;
use Payabli\Types\BillData;
use Payabli\Types\Frequency;
use DateTime;
use Payabli\Types\BillItem;

$client = new PayabliClient(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->invoice->addInvoice(
    '8cfec329267',
    new AddInvoiceRequest([
        'body' => new InvoiceDataRequest([
            'customerData' => new PayorDataRequest([
                'customerNumber' => 'C-90010',
                'firstName' => 'Tamara',
                'lastName' => 'Bagratoni',
            ]),
            'invoiceData' => new BillData([
                'discount' => 10,
                'frequency' => Frequency::OneTime->value,
                'invoiceAmount' => 1082.37,
                'invoiceDate' => new DateTime('2025-10-19'),
                'invoiceNumber' => 'INV-2345',
                'invoiceStatus' => 1,
                'invoiceType' => 0,
                'items' => [
                    new BillItem([
                        'itemCost' => 100,
                        'itemDescription' => 'Consultation for Georgian tours',
                        'itemMode' => 2,
                        'itemProductName' => 'Adventure Consult',
                        'itemQty' => 2,
                        'itemTotalAmount' => 200,
                    ]),
                    new BillItem([
                        'itemCost' => 882.37,
                        'itemDescription' => 'Deposit for trip planning',
                        'itemMode' => 2,
                        'itemProductName' => 'Deposit ',
                        'itemQty' => 1,
                        'itemTotalAmount' => 882.37,
                    ]),
                ],
            ]),
        ]),
    ]),
);

```

```swift
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customerData": [
    "customerNumber": "C-90010",
    "firstName": "Tamara",
    "lastName": "Bagratoni"
  ],
  "invoiceData": [
    "discount": 10,
    "frequency": "onetime",
    "invoiceAmount": 1082.37,
    "invoiceDate": "2025-10-19",
    "invoiceNumber": "INV-2345",
    "invoiceStatus": 1,
    "invoiceType": 0,
    "items": [
      [
        "itemCost": 100,
        "itemDescription": "Consultation for Georgian tours",
        "itemMode": 2,
        "itemProductName": "Adventure Consult",
        "itemQty": 2,
        "itemTotalAmount": 200
      ],
      [
        "itemCost": 882.37,
        "itemDescription": "Deposit for trip planning",
        "itemMode": 2,
        "itemProductName": "Deposit ",
        "itemQty": 1,
        "itemTotalAmount": 882.37
      ]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Invoice/8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```