Manage invoices

Learn how to create, update, delete, and send invoices with the Payabli API

Applies to:Developers

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.

POST
/api/Invoice/:entry
1curl -X POST https://api-sandbox.payabli.com/api/Invoice/8cfec329267 \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "customerData": {
6 "customerNumber": "3",
7 "firstName": "Tamara",
8 "lastName": "Bagratoni"
9 },
10 "invoiceData": {
11 "discount": 10,
12 "frequency": "one-time",
13 "invoiceAmount": 982.37,
14 "invoiceDate": "2025-10-19",
15 "invoiceNumber": "INV-3",
16 "invoiceStatus": 1,
17 "invoiceType": 0,
18 "items": [
19 {
20 "itemCost": 100,
21 "itemDescription": "Consultation for Georgian tours",
22 "itemMode": 1,
23 "itemProductName": "Adventure Consult",
24 "itemQty": 1
25 },
26 {
27 "itemCost": 882.37,
28 "itemDescription": "Deposit for trip planning",
29 "itemProductName": "Deposit ",
30 "itemQty": 1
31 }
32 ]
33 }
34}'

A successful request sends a 200 response with a JSON body that contains the invoice ID.

Response
1{
2 "isSuccess": true,
3 "responseCode": 1,
4 "responseData": 3625,
5 "responseText": "Success"
6}

Update an invoice

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

PUT
/api/Invoice/:idInvoice
1curl -X PUT https://api-sandbox.payabli.com/api/Invoice/332 \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "invoiceData": {
6 "invoiceAmount": 982.37,
7 "invoiceDate": "2025-10-19",
8 "invoiceNumber": "INV-6",
9 "items": [
10 {
11 "itemCost": 882.37,
12 "itemDescription": "Deposit for trip planning",
13 "itemProductName": "Deposit",
14 "itemQty": 1
15 }
16 ]
17 }
18}'

A successful request sends a 200 response with a JSON body, exactly like the one in the create an invoice example.

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
/api/Invoice/:idInvoice
1curl https://api-sandbox.payabli.com/api/Invoice/23548884 \
2 -H "requestToken: <apiKey>"

A successful request sends a 200 response that contains the invoice details.

Response
1{
2 "AdditionalData": "AdditionalData",
3 "billEvents": [
4 {
5 "description": "TransferCreated",
6 "eventTime": "2023-07-05T22:31:06Z",
7 "extraData": {
8 "key": "value"
9 },
10 "refData": "refData",
11 "source": "api"
12 }
13 ],
14 "company": "company",
15 "createdAt": "2022-07-01T15:00:01Z",
16 "customer": {
17 "AdditionalData": "AdditionalData",
18 "BillingAddress1": "1111 West 1st Street",
19 "BillingAddress2": "Suite 200",
20 "BillingCity": "Miami",
21 "BillingCountry": "US",
22 "BillingEmail": "example@email.com",
23 "BillingPhone": "5555555555",
24 "BillingState": "FL",
25 "BillingZip": "45567",
26 "CompanyName": "Sunshine LLC",
27 "CreatedAt": "2022-07-01T15:00:01Z",
28 "customerId": 4440,
29 "CustomerId": 4440,
30 "CustomerNumber": "3456-7645A",
31 "customerStatus": 1,
32 "FirstName": "John",
33 "Identifiers": [
34 "\\\"firstname\\\"",
35 "\\\"lastname\\\"",
36 "\\\"email\\\"",
37 "\\\"customId\\\""
38 ],
39 "LastName": "Doe",
40 "ShippingAddress1": "123 Walnut St",
41 "ShippingAddress2": "STE 900",
42 "ShippingCity": "Johnson City",
43 "ShippingCountry": "US",
44 "ShippingState": "TN",
45 "ShippingZip": "37619"
46 },
47 "customerId": 4440,
48 "discount": 10,
49 "documentsRef": {
50 "filelist": [
51 {}
52 ],
53 "zipfile": "zx45.zip"
54 },
55 "dutyAmount": 0,
56 "firstName": "firstName",
57 "freightAmount": 10,
58 "frequency": "frequency",
59 "invoiceAmount": 105,
60 "invoiceDate": "2025-07-01",
61 "invoiceDueDate": "2025-07-01",
62 "invoiceEndDate": "2025-07-01",
63 "invoiceId": 236,
64 "invoiceNumber": "INV-2345",
65 "invoicePaidAmount": 0,
66 "invoiceSentDate": "2025-10-19T00:00:00Z",
67 "invoiceStatus": 1,
68 "invoiceType": 0,
69 "items": [
70 {
71 "itemCost": 5,
72 "itemCommodityCode": "010",
73 "itemDescription": "Deposit for materials.",
74 "itemMode": 0,
75 "itemProductCode": "M-DEPOSIT",
76 "itemProductName": "Materials deposit",
77 "itemQty": 1,
78 "itemTaxAmount": 7,
79 "itemTaxRate": 0.075,
80 "itemTotalAmount": 1.1,
81 "itemUnitOfMeasure": "SqFt"
82 }
83 ],
84 "lastName": "lastName",
85 "lastPaymentDate": "2025-10-19T00:00:00Z",
86 "notes": "notes",
87 "parentOrgName": "parentOrgName",
88 "paylinkId": "paylinkId",
89 "paymentTerms": "NET30",
90 "paypointDbaname": "paypointDbaname",
91 "paypointEntryname": "paypointEntryname",
92 "paypointId": 56,
93 "paypointLegalname": "paypointLegalname",
94 "purchaseOrder": "PO-345",
95 "scheduledOptions": {
96 "includePaylink": true,
97 "includePdf": true
98 },
99 "shippingAddress1": "123 Walnut St",
100 "shippingAddress2": "STE 900",
101 "shippingCity": "Johnson City",
102 "shippingCountry": "US",
103 "shippingEmail": "example@email.com",
104 "shippingFromZip": "30040",
105 "shippingPhone": "shippingPhone",
106 "shippingState": "TN",
107 "shippingZip": "37619",
108 "summaryCommodityCode": "501718",
109 "tax": 2.05,
110 "termsConditions": "termsConditions"
111}

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
/api/Invoice/:idInvoice
1curl -X DELETE https://api-sandbox.payabli.com/api/Invoice/23548884 \
2 -H "requestToken: <apiKey>"

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

Response
1{
2 "isSuccess": true,
3 "responseCode": 1,
4 "responseData": 3625,
5 "responseText": "Success"
6}

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.

GET
/api/Invoice/send/:idInvoice
1curl -G https://api-sandbox.payabli.com/api/Invoice/send/23548884 \
2 -H "requestToken: <apiKey>" \
3 -d attachfile=true \
4 --data-urlencode mail2=tamara@example.com

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

Response
1{
2 "isSuccess": true,
3 "responseText": "Success"
4}