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
  version: 1.0.0
paths:
  /Invoice/{entry}:
    post:
      operationId: add-invoice
      summary: Add invoice
      description: Creates an invoice in an entrypoint.
      tags:
        - subpackage_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
          required: false
          schema:
            $ref: '#/components/schemas/type_:ForceCustomerCreation'
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
        - name: idempotencyKey
          in: header
          required: false
          schema:
            $ref: '#/components/schemas/type_:IdempotencyKey'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_invoice:InvoiceResponseWithoutData'
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_invoice:InvoiceDataRequest'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_: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
    type_: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. This key persists for 2 minutes. After 2 minutes, you can
        reuse the key if needed.
      title: IdempotencyKey
    type_: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
    type_:BillingAddressNullable:
      type: string
      description: Billing address.
      title: BillingAddressNullable
    type_:BillingAddressAddtlNullable:
      type: string
      description: Additional line for the billing address.
      title: BillingAddressAddtlNullable
    type_:BillingCityNullable:
      type: string
      description: Billing city.
      title: BillingCityNullable
    type_:BillingCountryNullable:
      type: string
      description: Billing address country.
      title: BillingCountryNullable
    type_:Email:
      type: string
      format: email
      description: Email address.
      title: Email
    type_:PhoneNumber:
      type: string
      description: Phone number.
      title: PhoneNumber
    type_:BillingStateNullable:
      type: string
      description: Billing state. Must be 2-letter state code for address in US.
      title: BillingStateNullable
    type_:BillingZip:
      type: string
      description: Billing address ZIP code.
      title: BillingZip
    type_:CustomerId:
      type: integer
      format: int64
      description: The Payabli-generated unique ID for the customer.
      title: CustomerId
    type_:CustomerNumberNullable:
      type: string
      description: >-
        User-provided unique identifier for the customer. This is typically the
        customer ID from your own system.
      title: CustomerNumberNullable
    type_:Identifierfields:
      type: array
      items:
        type: string
      description: >-
        List of fields acting as customer identifiers, to be used instead of
        CustomerNumber.
      title: Identifierfields
    type_:Shippingaddress:
      type: string
      description: The shipping address.
      title: Shippingaddress
    type_:Shippingaddressadditional:
      type: string
      description: Additional line for shipping address.
      title: Shippingaddressadditional
    type_:Shippingcity:
      type: string
      description: Shipping city.
      title: Shippingcity
    type_:Shippingcountry:
      type: string
      description: Shipping address country.
      title: Shippingcountry
    type_:Shippingstate:
      type: string
      description: Shipping state or province.
      title: Shippingstate
    type_: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
    type_:PayorDataRequest:
      type: object
      properties:
        additionalData:
          $ref: '#/components/schemas/type_:AdditionalData'
        billingAddress1:
          $ref: '#/components/schemas/type_:BillingAddressNullable'
        billingAddress2:
          $ref: '#/components/schemas/type_:BillingAddressAddtlNullable'
        billingCity:
          $ref: '#/components/schemas/type_:BillingCityNullable'
        billingCountry:
          $ref: '#/components/schemas/type_:BillingCountryNullable'
        billingEmail:
          $ref: '#/components/schemas/type_:Email'
        billingPhone:
          $ref: '#/components/schemas/type_:PhoneNumber'
        billingState:
          $ref: '#/components/schemas/type_:BillingStateNullable'
        billingZip:
          $ref: '#/components/schemas/type_: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/type_:CustomerId'
        customerNumber:
          $ref: '#/components/schemas/type_:CustomerNumberNullable'
        firstName:
          type: string
          description: Customer/Payor first name.
        identifierFields:
          $ref: '#/components/schemas/type_:Identifierfields'
        lastName:
          type: string
          description: Customer/Payor last name.
        shippingAddress1:
          $ref: '#/components/schemas/type_:Shippingaddress'
        shippingAddress2:
          $ref: '#/components/schemas/type_:Shippingaddressadditional'
        shippingCity:
          $ref: '#/components/schemas/type_:Shippingcity'
        shippingCountry:
          $ref: '#/components/schemas/type_:Shippingcountry'
        shippingState:
          $ref: '#/components/schemas/type_:Shippingstate'
        shippingZip:
          $ref: '#/components/schemas/type_:Shippingzip'
      description: >-
        Customer information. May be required, depending on the paypoint's
        settings. Required for subscriptions.
      title: PayorDataRequest
    type_: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. 


        ```json

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

        ```
      title: AdditionalDataMap
    type_: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
    type_: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/type_:FileContentFtype'
          description: The MIME type of the file (if content is provided)
        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
    type_:Attachments:
      type: array
      items:
        $ref: '#/components/schemas/type_:FileContent'
      description: >-
        Array of `fileContent` objects with attached documents. Max upload size
        is 30 MB.
      title: Attachments
    type_:Discount:
      type: number
      format: double
      description: Discount applied to the invoice.
      title: Discount
    type_:DutyAmount:
      type: number
      format: double
      description: Duty amount.
      title: DutyAmount
    type_:FreightAmount:
      type: number
      format: double
      description: Freight/shipping amount.
      title: FreightAmount
    type_:Frequency:
      type: string
      enum:
        - onetime
        - weekly
        - every2weeks
        - every6months
        - monthly
        - every3months
        - annually
      description: Frequency for operation.
      title: Frequency
    type_:InvoiceAmount:
      type: number
      format: double
      description: Invoice total amount.
      title: InvoiceAmount
    type_:InvoiceNumber:
      type: string
      description: >-
        Custom number identifying the bill or invoice. Must be unique in
        paypoint.
      title: InvoiceNumber
    type_:Invoicestatus:
      type: integer
      description: |-
        Status for invoice.

        The accepted status values are: 

          - 0 draft  
          - 1 active  
          - 2 partially paid  
          - 4 paid/complete  
          - 99 cancelled
      title: Invoicestatus
    type_:InvoiceType:
      type: integer
      description: Type of invoice. Only `0` for one-time invoices is currently supported.
      title: InvoiceType
    type_:ItemCommodityCode:
      type: string
      description: Item or product commodity code. Max length of 250 characters.
      title: ItemCommodityCode
    type_:ItemDescription:
      type: string
      description: Item or product description. Max length of 250 characters.
      title: ItemDescription
    type_:ItemProductCode:
      type: string
      description: Item or product code. Max length of 250 characters.
      title: ItemProductCode
    type_:ItemProductName:
      type: string
      description: Item or product name. Max length of 250 characters.
      title: ItemProductName
    type_:ItemUnitofMeasure:
      type: string
      description: Unit of measurement. Max length of 100 characters.
      title: ItemUnitofMeasure
    type_:BillItem:
      type: object
      properties:
        itemCategories:
          type: array
          items:
            type: string
          description: Array of tags classifying item or product.
        itemCommodityCode:
          $ref: '#/components/schemas/type_:ItemCommodityCode'
        itemCost:
          type: number
          format: double
          description: Item or product price per unit.
        itemDescription:
          $ref: '#/components/schemas/type_:ItemDescription'
        itemMode:
          type: integer
          description: >-
            Internal class of item or product: value '0' is only for invoices ,
            '1' for bills and, '2' common for both.
        itemProductCode:
          $ref: '#/components/schemas/type_:ItemProductCode'
        itemProductName:
          $ref: '#/components/schemas/type_: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: Total amount in item or product.
        itemUnitOfMeasure:
          $ref: '#/components/schemas/type_:ItemUnitofMeasure'
      required:
        - itemCost
      title: BillItem
    type_: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`.


        **Available Values:**


        - `PIA`: Payment in advance


        - `CIA`: Cash in advance


        - `UR`: Upon receipt


        - `NET10`: 10 days after invoice date


        - `NET20`: 20 days after invoice date


        - `NET30`: 30 days after invoice date


        - `NET45`: 45 days after invoice date


        - `NET60`: 60 days after invoice date


        - `NET90`: 90 days after invoice date


        - `EOM`: Due end of this month


        - `MFI`: 1st of the month following the invoice date


        - `5MFI`: 5th of the month following the invoice date


        - `10MFI`: 10th of the month following the invoice date


        - `15MFI`: 15th of the month following the invoice date


        - `20MFI`: 20th of the month following the invoice date


        - `2/10NET30`: 2% discount if paid within 10 days, otherwise net 30 days


        - `UF`: Until further notice


        - `10UF`: 10 days until further notice


        - `20UF`: 20 days until further notice


        - `25UF`: 25 days until further notice


        - `50UF`: 50 days until further notice
      title: BillDataPaymentTerms
    type_:PurchaseOrder:
      type: string
      description: Purchase order number.
      title: PurchaseOrder
    type_:ShippingFromZip:
      type: string
      description: Sender shipping ZIP code.
      title: ShippingFromZip
    type_:SummaryCommodityCode:
      type: string
      description: Commodity code.
      title: SummaryCommodityCode
    type_:Tax:
      type: number
      format: double
      description: Tax rate in percent applied to the invoice.
      title: Tax
    type_:TermsConditions:
      type: string
      description: Custom terms and conditions included in the invoice.
      title: TermsConditions
    type_:BillData:
      type: object
      properties:
        AdditionalData:
          $ref: '#/components/schemas/type_:AdditionalDataMap'
        attachments:
          $ref: '#/components/schemas/type_:Attachments'
        company:
          type: string
          description: Company name of the recipient of the invoice.
        discount:
          $ref: '#/components/schemas/type_:Discount'
        dutyAmount:
          $ref: '#/components/schemas/type_:DutyAmount'
        firstName:
          type: string
          description: First name of the recipient of the invoice.
        freightAmount:
          $ref: '#/components/schemas/type_:FreightAmount'
        frequency:
          $ref: '#/components/schemas/type_:Frequency'
          description: Frequency of scheduled invoice.
        invoiceAmount:
          $ref: '#/components/schemas/type_: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/type_:InvoiceNumber'
          description: Invoice number. Identifies the invoice under a paypoint.
        invoiceStatus:
          $ref: '#/components/schemas/type_:Invoicestatus'
        invoiceType:
          $ref: '#/components/schemas/type_:InvoiceType'
        items:
          type: array
          items:
            $ref: '#/components/schemas/type_: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/type_:BillDataPaymentTerms'
        purchaseOrder:
          $ref: '#/components/schemas/type_:PurchaseOrder'
        shippingAddress1:
          $ref: '#/components/schemas/type_:Shippingaddress'
        shippingAddress2:
          $ref: '#/components/schemas/type_:Shippingaddressadditional'
        shippingCity:
          $ref: '#/components/schemas/type_:Shippingcity'
        shippingCountry:
          $ref: '#/components/schemas/type_:Shippingcountry'
        shippingEmail:
          $ref: '#/components/schemas/type_:Email'
          description: Shipping recipient's contact email address.
        shippingFromZip:
          $ref: '#/components/schemas/type_:ShippingFromZip'
        shippingPhone:
          type: string
          description: Recipient phone number.
        shippingState:
          $ref: '#/components/schemas/type_:Shippingstate'
        shippingZip:
          $ref: '#/components/schemas/type_:Shippingzip'
        summaryCommodityCode:
          $ref: '#/components/schemas/type_:SummaryCommodityCode'
        tax:
          $ref: '#/components/schemas/type_:Tax'
        termsConditions:
          $ref: '#/components/schemas/type_:TermsConditions'
      title: BillData
    type_: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
    type_invoice:InvoiceDataRequest:
      type: object
      properties:
        customerData:
          $ref: '#/components/schemas/type_: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/type_:BillData'
          description: Object describing the invoice. Required for POST requests.
        scheduledOptions:
          $ref: '#/components/schemas/type_:BillOptions'
          description: Object with options for scheduled invoices.
      title: InvoiceDataRequest
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:Responsecode:
      type: integer
      description: >-
        Code for the response. Learn more in [API Response
        Codes](/developers/api-reference/api-responses).
      title: Responsecode
    type_:Responsedatanonobject:
      oneOf:
        - type: string
        - type: integer
      description: The response data.
      title: Responsedatanonobject
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    type_:RoomIdNotInUse:
      type: integer
      format: int64
      description: Field not in use on this endpoint. It always returns `0`.
      title: RoomIdNotInUse
    type_invoice:InvoiceResponseWithoutData:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseCode:
          $ref: '#/components/schemas/type_:Responsecode'
        responseData:
          $ref: '#/components/schemas/type_: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/type_:ResponseText'
        pageidentifier:
          oneOf:
            - $ref: '#/components/schemas/type_:PageIdentifier'
            - type: 'null'
        roomId:
          $ref: '#/components/schemas/type_:RoomIdNotInUse'
      required:
        - isSuccess
        - responseCode
        - responseData
        - responseText
        - pageidentifier
        - roomId
      description: Response schema for invoice operations.
      title: InvoiceResponseWithoutData
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript AddInvoice
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: "3",
                firstName: "Tamara",
                lastName: "Bagratoni",
            },
            invoiceData: {
                discount: 10,
                frequency: "onetime",
                invoiceAmount: 982.37,
                invoiceDate: "2025-10-19",
                invoiceNumber: "INV-3",
                invoiceStatus: 1,
                invoiceType: 0,
                items: [
                    {
                        itemCost: 100,
                        itemDescription: "Consultation for Georgian tours",
                        itemMode: 1,
                        itemProductName: "Adventure Consult",
                        itemQty: 1,
                        itemTotalAmount: 1,
                    },
                    {
                        itemCost: 882.37,
                        itemDescription: "Deposit for trip planning",
                        itemProductName: "Deposit ",
                        itemQty: 1,
                        itemTotalAmount: 1,
                    },
                ],
            },
        },
    });
}
main();

```

```python AddInvoice
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="3",
        first_name="Tamara",
        last_name="Bagratoni",
    ),
    invoice_data=BillData(
        discount=10,
        frequency="onetime",
        invoice_amount=982.37,
        invoice_date=datetime.date.fromisoformat("2025-10-19"),
        invoice_number="INV-3",
        invoice_status=1,
        invoice_type=0,
        items=[
            BillItem(
                item_cost=100,
                item_description="Consultation for Georgian tours",
                item_mode=1,
                item_product_name="Adventure Consult",
                item_qty=1,
                item_total_amount=1,
            ),
            BillItem(
                item_cost=882.37,
                item_description="Deposit for trip planning",
                item_product_name="Deposit ",
                item_qty=1,
                item_total_amount=1,
            )
        ],
    ),
)

```

```csharp AddInvoice
using PayabliPayabliApi;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;

namespace Usage;

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

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

                    }
                }
            }
        );
    }

}

```

```go AddInvoice
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Invoice/8cfec329267"

	payload := strings.NewReader("{\n  \"customerData\": {\n    \"customerNumber\": \"3\",\n    \"firstName\": \"Tamara\",\n    \"lastName\": \"Bagratoni\"\n  },\n  \"invoiceData\": {\n    \"discount\": 10,\n    \"frequency\": \"onetime\",\n    \"invoiceAmount\": 982.37,\n    \"invoiceDate\": \"2025-10-19\",\n    \"invoiceNumber\": \"INV-3\",\n    \"invoiceStatus\": 1,\n    \"invoiceType\": 0,\n    \"items\": [\n      {\n        \"itemCost\": 100,\n        \"itemDescription\": \"Consultation for Georgian tours\",\n        \"itemMode\": 1,\n        \"itemProductName\": \"Adventure Consult\",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      },\n      {\n        \"itemCost\": 882.37,\n        \"itemDescription\": \"Deposit for trip planning\",\n        \"itemProductName\": \"Deposit \",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby AddInvoice
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Invoice/8cfec329267")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customerData\": {\n    \"customerNumber\": \"3\",\n    \"firstName\": \"Tamara\",\n    \"lastName\": \"Bagratoni\"\n  },\n  \"invoiceData\": {\n    \"discount\": 10,\n    \"frequency\": \"onetime\",\n    \"invoiceAmount\": 982.37,\n    \"invoiceDate\": \"2025-10-19\",\n    \"invoiceNumber\": \"INV-3\",\n    \"invoiceStatus\": 1,\n    \"invoiceType\": 0,\n    \"items\": [\n      {\n        \"itemCost\": 100,\n        \"itemDescription\": \"Consultation for Georgian tours\",\n        \"itemMode\": 1,\n        \"itemProductName\": \"Adventure Consult\",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      },\n      {\n        \"itemCost\": 882.37,\n        \"itemDescription\": \"Deposit for trip planning\",\n        \"itemProductName\": \"Deposit \",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java AddInvoice
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/Invoice/8cfec329267")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customerData\": {\n    \"customerNumber\": \"3\",\n    \"firstName\": \"Tamara\",\n    \"lastName\": \"Bagratoni\"\n  },\n  \"invoiceData\": {\n    \"discount\": 10,\n    \"frequency\": \"onetime\",\n    \"invoiceAmount\": 982.37,\n    \"invoiceDate\": \"2025-10-19\",\n    \"invoiceNumber\": \"INV-3\",\n    \"invoiceStatus\": 1,\n    \"invoiceType\": 0,\n    \"items\": [\n      {\n        \"itemCost\": 100,\n        \"itemDescription\": \"Consultation for Georgian tours\",\n        \"itemMode\": 1,\n        \"itemProductName\": \"Adventure Consult\",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      },\n      {\n        \"itemCost\": 882.37,\n        \"itemDescription\": \"Deposit for trip planning\",\n        \"itemProductName\": \"Deposit \",\n        \"itemQty\": 1,\n        \"itemTotalAmount\": 1\n      }\n    ]\n  }\n}")
  .asString();
```

```php AddInvoice
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/Invoice/8cfec329267', [
  'body' => '{
  "customerData": {
    "customerNumber": "3",
    "firstName": "Tamara",
    "lastName": "Bagratoni"
  },
  "invoiceData": {
    "discount": 10,
    "frequency": "onetime",
    "invoiceAmount": 982.37,
    "invoiceDate": "2025-10-19",
    "invoiceNumber": "INV-3",
    "invoiceStatus": 1,
    "invoiceType": 0,
    "items": [
      {
        "itemCost": 100,
        "itemDescription": "Consultation for Georgian tours",
        "itemMode": 1,
        "itemProductName": "Adventure Consult",
        "itemQty": 1,
        "itemTotalAmount": 1
      },
      {
        "itemCost": 882.37,
        "itemDescription": "Deposit for trip planning",
        "itemProductName": "Deposit ",
        "itemQty": 1,
        "itemTotalAmount": 1
      }
    ]
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift AddInvoice
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customerData": [
    "customerNumber": "3",
    "firstName": "Tamara",
    "lastName": "Bagratoni"
  ],
  "invoiceData": [
    "discount": 10,
    "frequency": "onetime",
    "invoiceAmount": 982.37,
    "invoiceDate": "2025-10-19",
    "invoiceNumber": "INV-3",
    "invoiceStatus": 1,
    "invoiceType": 0,
    "items": [
      [
        "itemCost": 100,
        "itemDescription": "Consultation for Georgian tours",
        "itemMode": 1,
        "itemProductName": "Adventure Consult",
        "itemQty": 1,
        "itemTotalAmount": 1
      ],
      [
        "itemCost": 882.37,
        "itemDescription": "Deposit for trip planning",
        "itemProductName": "Deposit ",
        "itemQty": 1,
        "itemTotalAmount": 1
      ]
    ]
  ]
] 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()
```