API Basics
Pay In Endpoints
- MoneyIn
- Subscription
- TokenStorage
- Invoice
- LineItem
- PaymentLink
- PaymentMethodDomain
- HostedPaymentPages
- Cloud
- Wallet: Apple Pay
Pay Out Endpoints
- MoneyOut
- Bill
Pay Ops Endpoints
- Templates
- Boarding
- Chargebacks and ACH Returns
- Entities
- Notification
- Query
- Statistic
- Export
- Import
Object Models
- Object Model References
Update Invoice
Updates details for a single invoice in an entrypoint.
curl --request PUT \
--url https://api-sandbox.payabli.com/api/Invoice/{idInvoice} \
--header 'Content-Type: application/json' \
--header 'requestToken: <api-key>' \
--data '{
"customerData": {
"customerId": 4440,
"firstName": "John",
"lastName": "Doe",
"company": "Sunshine LLC",
"customerNumber": "3456-7645A",
"billingAddress1": "123 Walnut Street",
"billingAddress2": "STE 900",
"billingCity": "Johnson City",
"billingState": "Johnson City",
"billingZip": "37615",
"billingCountry": "US",
"billingPhone": "5555555555",
"billingEmail": "example@email.com",
"shippingAddress1": "123 Walnut St",
"shippingAddress2": "STE 900",
"shippingCity": "Johnson City",
"shippingState": "TN",
"shippingZip": "37619",
"shippingCountry": "US",
"additionalData": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"identifierFields": [
"email"
]
},
"invoiceData": {
"invoiceNumber": "INV-2345",
"invoiceDate": "2024-07-01",
"invoiceDueDate": "2024-07-01",
"invoiceType": 0,
"invoiceEndDate": "2024-07-01",
"invoiceStatus": 1,
"frequency": "monthly",
"paymentTerms": "PIA",
"termsConditions": "Must be paid before work scheduled.",
"notes": "Example notes.",
"tax": 2.05,
"discount": 10,
"invoiceAmount": 105,
"freightAmount": 10,
"dutyAmount": 0,
"purchaseOrder": "PO-345",
"firstName": "Chad",
"lastName": "Mercia",
"company": "ACME, INC",
"shippingAddress1": "123 Walnut St",
"shippingAddress2": "STE 900",
"shippingCity": "Johnson City",
"shippingState": "TN",
"shippingZip": "37619",
"shippingCountry": "US",
"shippingEmail": "example@email.com",
"shippingPhone": "5555555555",
"shippingFromZip": "30040",
"summaryCommodityCode": "501718",
"items": [
{
"itemProductCode": "M-DEPOSIT",
"itemProductName": "Materials deposit",
"itemDescription": "Deposit for materials.",
"itemCommodityCode": "010",
"itemUnitOfMeasure": "SqFt",
"itemCost": 5,
"itemQty": 1,
"itemMode": 0,
"itemCategories": [
"<string>"
],
"itemTotalAmount": 123,
"itemTaxAmount": 7,
"itemTaxRate": 0.075
}
],
"attachments": {},
"AdditionalData": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
},
"scheduledOptions": {
"includePaylink": true,
"includePdf": true
}
}'
{
"isSuccess": true,
"responseText": "Success",
"responseCode": 1,
"responseData": 3625,
"pageidentifier": null
}
Authorizations
Most endpoints require an organization
token. Some endpoints require an application
token, and those endpoints are noted.
Path Parameters
Invoice ID
23548884
Query Parameters
When true
, the request creates a new customer record, regardless of whether customer identifiers match an existing customer.
Body
Object describing the customer/payor. Required for POST requests. Which fields are required depends on the paypoint's custom identifier settings. See PayorData Object Model for a complete reference.
The Payabli-generated unique ID for the customer.
4440
Customer/Payor first name.
250
"John"
Customer/Payor last name.
250
"Doe"
Customer's company name.
250
"Sunshine LLC"
User-provided unique identifier for the customer. This is typically the customer ID from your own system.
250
"3456-7645A"
Customer's billing address.
250
"123 Walnut Street"
Additional line for Customer's billing address.
100
"STE 900"
Customer's billing city.
250
"Johnson City"
Customer's billing state. Must be 2-letter state code for address in US.
250
"Johnson City"
Customer's billing ZIP code.
50
"37615"
Customer's billing country.
100
"US"
Customer's phone number.
50
"5555555555"
Customer's email address.
320
"example@email.com"
The shipping address.
250
"123 Walnut St"
Additional line for shipping address.
100
"STE 900"
Shipping city.
250
"Johnson City"
Shipping state or province.
"TN"
Shipping ZIP code.
50
"37619"
Shipping address country.
100
"US"
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, pass those in this object. Example usage:
{
"additionalData": {
"CustomIdentifier": "value",
"key2": "value2",
"key3": "value3"
}
}
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
List of fields acting as customer identifiers, to be used instead of CustomerNumber.
["email"]
Object describing the invoice. Required for POST requests.
Invoice number. Identifies the invoice under a paypoint.
250
"INV-2345"
Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
"2024-07-01"
Invoice due date in one of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
"2024-07-01"
Type of invoice. Only 0
for one-time invoices is currently supported.
0
Indicate the date to finish a scheduled invoice cycle (`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
"2024-07-01"
Status for invoice.
The accepted status values are:
- 0 draft
- 1 active
- 2 partially paid
- 4 paid/complete
- 99 cancelled
0
, 1
, 2
, 4
, 99
1
Frequency of scheduled invoice.
one-time
, weekly
, every2weeks
, every6months
, monthly
, every3months
, annually
"monthly"
Payment terms for invoice. If no terms are defined, then reponse data for this field defaults to N30
.
PIA
, CIA
, UR
, NET10
, NET20
, NET30
, NET45
, NET60
, NET90
, EOM
, MFI
, 5MFI
, 10MFI
, 15MFI
, 20MFI
, 2/10NET30
, UF
, 10UF
, 20UF
, 25UF
, 50UF
"PIA"
Custom terms and conditions included in the invoice.
"Must be paid before work scheduled."
Notes included in the invoice.
"Example notes."
Tax rate in percent applied to the invoice.
2.05
Discount applied to the invoice.
10
Invoice total amount.
105
Freight/shipping amount.
10
Duty amount.
0
Purchase order number.
"PO-345"
First name of the recipient of the invoice.
"Chad"
Last name of the recipient of the invoice.
"Mercia"
Company name of the recipient of the invoice.
"ACME, INC"
The shipping address.
250
"123 Walnut St"
Additional line for shipping address.
100
"STE 900"
Shipping city.
250
"Johnson City"
Shipping state or province.
"TN"
Shipping ZIP code.
50
"37619"
Shipping address country.
"US"
Shipping recipient's contact email address.
320
"example@email.com"
Recipient phone number.
"5555555555"
Sender shipping ZIP code.
"30040"
Commodity code.
"501718"
Array of line items included in the invoice.
Item or product name. Max length of 250 characters.
250
"Materials deposit"
Item or product price per unit.
5
Quantity of item or product.
1
Item or product code. Max length of 250 characters.
250
"M-DEPOSIT"
Item or product description. Max length of 250 characters.
250
"Deposit for materials."
Item or product commodity code. Max length of 250 characters.
250
"010"
Unit of measurement. Max length of 100 characters.
100
"SqFt"
Internal class of item or product: value '0' is only for invoices , '1' for bills and, '2' common for both.
0
, 1
, 2
0
Array of tags classifying item or product.
Total amount in item or product.
Tax amount applied to item or product.
7
Tax rate applied to item or product.
0.075
Array of fileContent
objects with attached documents. Max upload size is 30 MB.
Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage:
{
"additionalData": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
Response
Response schema for invoice operations.
Boolean indicating whether the operation was successful. A true
value indicates success. A false
value indicates failure.
true
Response text for operation: 'Success' or 'Declined'.
"Success"
Code for the response. Learn more in API Response Codes.
1
If isSuccess
= true, this contains the identifier of the invoice. If isSuccess
= false, this contains the reason for the failure.
Auxiliary validation used internally by payment pages and components.
null
Was this page helpful?
curl --request PUT \
--url https://api-sandbox.payabli.com/api/Invoice/{idInvoice} \
--header 'Content-Type: application/json' \
--header 'requestToken: <api-key>' \
--data '{
"customerData": {
"customerId": 4440,
"firstName": "John",
"lastName": "Doe",
"company": "Sunshine LLC",
"customerNumber": "3456-7645A",
"billingAddress1": "123 Walnut Street",
"billingAddress2": "STE 900",
"billingCity": "Johnson City",
"billingState": "Johnson City",
"billingZip": "37615",
"billingCountry": "US",
"billingPhone": "5555555555",
"billingEmail": "example@email.com",
"shippingAddress1": "123 Walnut St",
"shippingAddress2": "STE 900",
"shippingCity": "Johnson City",
"shippingState": "TN",
"shippingZip": "37619",
"shippingCountry": "US",
"additionalData": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"identifierFields": [
"email"
]
},
"invoiceData": {
"invoiceNumber": "INV-2345",
"invoiceDate": "2024-07-01",
"invoiceDueDate": "2024-07-01",
"invoiceType": 0,
"invoiceEndDate": "2024-07-01",
"invoiceStatus": 1,
"frequency": "monthly",
"paymentTerms": "PIA",
"termsConditions": "Must be paid before work scheduled.",
"notes": "Example notes.",
"tax": 2.05,
"discount": 10,
"invoiceAmount": 105,
"freightAmount": 10,
"dutyAmount": 0,
"purchaseOrder": "PO-345",
"firstName": "Chad",
"lastName": "Mercia",
"company": "ACME, INC",
"shippingAddress1": "123 Walnut St",
"shippingAddress2": "STE 900",
"shippingCity": "Johnson City",
"shippingState": "TN",
"shippingZip": "37619",
"shippingCountry": "US",
"shippingEmail": "example@email.com",
"shippingPhone": "5555555555",
"shippingFromZip": "30040",
"summaryCommodityCode": "501718",
"items": [
{
"itemProductCode": "M-DEPOSIT",
"itemProductName": "Materials deposit",
"itemDescription": "Deposit for materials.",
"itemCommodityCode": "010",
"itemUnitOfMeasure": "SqFt",
"itemCost": 5,
"itemQty": 1,
"itemMode": 0,
"itemCategories": [
"<string>"
],
"itemTotalAmount": 123,
"itemTaxAmount": 7,
"itemTaxRate": 0.075
}
],
"attachments": {},
"AdditionalData": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
},
"scheduledOptions": {
"includePaylink": true,
"includePdf": true
}
}'
{
"isSuccess": true,
"responseText": "Success",
"responseCode": 1,
"responseData": 3625,
"pageidentifier": null
}