Library OpenApi Overview About these APIs Architecture Authentication Error Responses Locating a Server Sessions Design Guides Guides and Hints Examples Pricing for Websites Accepting Vouchers PreAuth Payment Replication Common Apis The most used APIs Create New Sale Payment Completion Multiple Locations Delivery Addresses Create New Sale v2 Customers Locations Products Staff WebHooks eCommerce Apis These APIs are often used with eCommerce website integrations Get Pricing Card Inquiry Report & Analysis Grouped or analysed report data. Typically used to build reports and dashboards Today Login Access Pinboard ReportRequest Advanced Information More indepth information Caller Handling HTTP Protocol Bulk Data Downloads Document Uploading RetailConfig Under Development Details of APIs that will be available shortly. Documentation provided is for early adopters Get Receipt

Design Guide: PreAuth Payments

PreAuth Payments are when the website creates a sale and takes a pre authorised payment against the customers credit card. The sale is then sent for picking and dispatch and once complete the payment amount is charged to the customers card. This process is necessary where the original order and what is actually dispatched can vary.

Customer Creates SaleYour website and shopping cart
Connects to Payment Processor and PreAuths an AmountYour website and shopping cart
Sale POST to Fieldpine /SalesYour website and shopping cart
Team Member picks and packs orderWarehouse
Sale finished and final amount due setWarehouse
Final Sale details obtainedYour website and shopping cart
Payment processor charges credit cardYour website and shopping cart

Sending Sale to Fieldpine

Consider a sale where the customer purchases two items, and has a credit voucher (a payment) for $20.

{
  "ExternalId": "Sale.000001",
  "CompletedDt": "2019-07-01T10:35",
  "Phase": 200,         // NOTE. Sale is in picking state
  "LINE": [{
    "Pid": 12345,
    "Qty": 1,
    "TotalPrice": 9.00,
  }, {
    "Pid": 992,
    "Qty": 1,
    "TotalPrice": 77.00
  }
  ],
  "PAYM": [{
    "Type": "Manual Credit",
    "Amount": 20.00
  },{
    "Type": "Credit PreAuth",
    "Amount": 66.00
  }]
}

While in the warehouse the $9 item is out of stock and not dispatched. So the sale is finalised for a total of $77 not the original $86. After subtracted the $20 manual credit the amount $57 should finally be charged to the credit card.

Your webserver should obtain a copy of the finalised sale, either via WebHook or polling. This might look something like this:

{
  "SaleId": 850000194,
  "ExternalId": "Sale.000001",
  "CompletedDt": "2019-07-01T10:35",
  "Location": 23,
  "SaleTotal": 66.00,
  "SaleTotalExTax": 56.80,
  "SaleTotalTax1", 9.20,
  "Phase": 1,           // Sale is now in Completed Phase
  "LINE": [{
    "Pid": 12345,
    "Qty": 0,           // Item is not deleted, but quantity set to zero
    "TotalPrice": 9.00
  }, {
    "Pid": 992,
    "Qty": 1,
    "TotalPrice": 77.00
  }
  ],
  "PAYM": [{
    "Type": "Manual Credit",
    "CompletedDt": "2019-07-01T10:51",
    "Sequence": 1,
    "Amount": 20.00
  },{
    "Type": "Credit PreAuth",
    "CompletedDt": "2019-07-01T10:51",
    "Sequence": 2,
    "Amount": 66.00
  },{
    "Type": "Change",   // New Payment type added
    "DateTime": "2019-07-03T14:23",
    "Sequence": 3,
    "Amount": 9.00
  }]
}