FD1 Client Protocol
 
Library Developer Home FD1 Client Protocol Home Concepts Reading Data Writing Data Protocol Defined Servers Connect & Authenticate Proxies & Tunnels
Webhooks & Firehoses Programming Support Logging Minor Facts State Facts Response Format How To Guides eCommerce Sites Custom Point of Sale Customer Access Bulk Downloads Major APIs / Endpoints All Endpoints Products Sales SalesBuilder Session Get Attribute Sale Capture General Purpose Data Capture Devices Barcode Scanners Eftpos IoT Sensors Power Outlets Printing Scales Security Cameras Purchasing / Supply Side Purchase Orders Invoices Invoice Payments Document Capture Rare APIs / Endpoints SSL Certificates API Key Management Diagnositics PosGreen Server to Client Messages Overview Resources / Objects Purchase Order Invoice Payable Invoice Payment Product Supplier Location Sale Lines Sale Delivery Details Sales Price Maps Employees Carriers Payments Product Kits Department 1 Customers

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.

TypeRead
HTTPGET, 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.

TypeWrite
HTTPPOST
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"
  }
}