PUT
/
Invoice
/
{idInvoice}
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

requestToken
string
header
required

Most endpoints require an organization token. Some endpoints require an application token, and those endpoints are noted.

Path Parameters

idInvoice
integer
required

Invoice ID

Example:

23548884

Query Parameters

forceCustomerCreation
boolean
default:false

When true, the request creates a new customer record, regardless of whether customer identifiers match an existing customer.

Body

InvoiceData object with the modified invoice details
customerData
object

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.

invoiceData
object

Object describing the invoice. Required for POST requests.

scheduledOptions
object

Object with options for scheduled invoices.

Response

200
application/json
Success

Response schema for invoice operations.

isSuccess
boolean

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

Example:

true

responseText
string | null

Response text for operation: 'Success' or 'Declined'.

Example:

"Success"

responseCode
integer | null

Code for the response. Learn more in API Response Codes.

Example:

1

responseData

If isSuccess = true, this contains the identifier of the invoice. If isSuccess = false, this contains the reason for the failure.

pageidentifier
string | null

Auxiliary validation used internally by payment pages and components.

Example:

null

Was this page helpful?