Library
Webhooks & Firehoses
FD1 Invoice Payment
Functions relating to Invoice Payment records. These record payments made by a retailer themselves, typically for a purchase order. This is not recording payments from customers to the retailer
purchaseorders.get_invoice_payment
Retrive Invoice Payment Records.
| Type | Read |
| HTTP | GET, POST |
| Links | Fields |
Example - fetching all payments given a Purchase Order Id
POST /fd1/purchaseorders/get_invoice_payment
{
"a": "purchaseorders.get_invoice_payment",
"q": {
"pophyskey": "KODJKBJBQKEPFVVNCNBZZYU"
}
}
Or
GET /fd1/purchaseorders/get_invoice_payment?pophyskey=KODJKBJBQKEPFVVNCNBZZYU
purchaseorders.add_invoice_payment
invoices.add_invoice_payment
Inserts a new payment record against an invoice.
| Type | Write |
| HTTP | POST |
Example recording a payment against a specific purchase order. This both informs Fieldpine of the invoice (INV-2955) and
links the invoice to the purchase order
POST /fd1/purchaseorders/add_invoice_payment
{
"a": "purchaseorders.add_invoice_payment",
"v": {
"pophyskey": "KEPZHJ928JSKCWE92SKKLZAZ14ZB", // Taken from get_purchaseorder_header "physkey"
"ref": "INV-2955",
"amount": 89.95,
"paymentdate": "2023-09-01 09:00",
"comments": "Paying 89.95 only as remaining 23.50 is awaiting a credit note"
}
}
Example recording a payment against a known invoice that has already been loaded into Fieldpine.
POST /fd1/invoices/add_invoice_payment
{
"a": "invoices.add_invoice_payment",
"v": {
"invoicephyskey": "KZSDDKQDBVBEJRHH345BND8E",
"ref": "A3456",
"amount": 520.00,
"paymentdate": "2024-02-02 11:37"
}
}