In Payabli, invoices are what you send to customers when you expect payment. You can use Payabli’s invoicing APIs to send basic invoices or invoices with detailed descriptions, order quantities, and payment terms.

This guide covers the key operations for managing invoices through the API.

Considerations

When working with invoices, keep the following in mind:

  • Invoices are always linked to a customer. If you don’t include a customerId and the customerData fields don’t match an existing customer, Payabli creates a new customer.
  • Payabli strongly recommends creating the customer first and passing the customerId in the customerData object.
  • Invoice numbers must be unique within an paypoint.
  • Invoices can be one-time or recurring.
  • You can attach a PDF version of an invoice when sending via email using the attachfile=true parameter.

Create an invoice

Send a POST request to /api/Invoice/{entry} to create a new invoice. See the API reference for this endpoint for full documentation.

Create invoice example
curl --request POST \
     --url 'https://api-sandbox.payabli.com/api/Invoice/e756ce00572?forceCustomerCreation=false' \
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --header 'requestToken: <API TOKEN>' \
     --data '
{
  "customerData": {
    "firstName": "Tamara",
    "lastName": "Bagratoni",
    "customerNumber": "3"
  },
  "invoiceData": {
    "items": [
      {
        "itemProductName": "Adventure Consult",
        "itemDescription": "Consultation for Georgian tours",
        "itemCost": 100,
        "itemQty": 1,
        "itemMode": 1
      },
      {
        "itemProductName": "Deposit ",
        "itemDescription": "Deposit for trip planning",
        "itemCost": 882.37,
        "itemQty": 1
      }
    ],
    "invoiceDate": "05/04/2025",
    "invoiceType": 0,
    "invoiceStatus": 1,
    "frequency": "one-time",
    "invoiceAmount": 982.37,
    "discount": 10,
    "invoiceNumber": "INV-3"
  }
}'

Update an invoice

Send a PUT request to /api/Invoice/{idInvoice} to modify an existing invoice’s details such as amount, items, or status. See the API reference for this endpoint for full documentation.

Update invoice example
curl --request PUT \
     --url https://api-sandbox.payabli.com/api/Invoice/332 \
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --header 'requestToken: <API TOKEN>' \
     --data '
{
  "invoiceData": {
    "items": [
      {
        "itemProductName": "Adventure Consult",
        "itemDescription": "Extended consultation for Georgian tours",
        "itemCost": 150,
        "itemQty": 1,
        "itemMode": 1
      }
    ],
    "invoiceAmount": 150,
    "invoiceStatus": 1
  }
}'

Get invoice details

Send a GET request to /api/Invoice/{idInvoice} to retrieve details about a specific invoice. See the API reference for this endpoint for full documentation.

This example gets details for the invoice with ID 332.

Get invoice example
curl --request GET \
     --url https://api-sandbox.payabli.com/api/Invoice/332 \
     --header 'accept: application/json' \
     --header 'requestToken: <API TOKEN>'

Delete an invoice

Send a DELETE request to /api/Invoice/{idInvoice} to delete an invoice. See the API reference for this endpoint for full documentation.

This example deletes the invoice with ID 332.

Delete invoice example
curl --request DELETE \
     --url https://api-sandbox.payabli.com/api/Invoice/332 \
     --header 'accept: application/json' \
     --header 'requestToken: <API TOKEN>'

Response format

All create, update, and delete invoice operations return a standardized response format:

{
  "responseText": "Success",
  "isSuccess": true,
  "responseData": 332, // this is the invoice ID
  "responseCode": 1
}

The get invoice operation returns a more detailed response. See the API references for each endpoint for complete example responses.

Email an invoice

Send a GET request to /api/Invoice/send/{idInvoice} to email an invoice to a customer. See the API reference for this endpoint for full documentation.

Before you get started, you need the IdInvoice value returned in the response when you created the invoice and the customer email address.

This example emails the invoice with ID 332 to “tamara@example.com”, and attaches a PDF copy of the invoice.

Email invoice example
curl --request GET \
     --url 'https://api-sandbox.payabli.com/api/Invoice/send/332?mail2=tamara%2540example.com&attachfile=true' \
     --header 'accept: application/json' \
     --header 'requestToken: <API TOKEN>'

A successful request returns a 200 response with a JSON body.

Example email invoice response
{
  "isSuccess": true,
  "responseText": "Success"
}