Record Purchase Order Payment

Records a payment made to the supplier against a purchase order (approved, partially received or received; drafts and cancelled POs are rejected with 400). The PO's payable is its received value — cost + tax of its non-voided receives, landed costs excluded — so a payment made before the goods arrive (a deposit) is accepted and shows as overpaid (negative outstanding_amount; payment_status_text reads "Advance" while nothing is received yet) until receives catch up. A payment that would take the PO's total paid past the larger of its ordered total and its received value is rejected with 400. Requires the approve-purchase-orders permission at the PO's location.

Amounts are always in the company currency, also on a foreign-currency PO (convert with the PO's currency.rate: foreign = amount / rate). Receipts (transfer slips) are attached from the Ewity web app; file upload is not part of the documented App API, so payments recorded by an App carry receipt: null.

The payment method's own configuration decides what else is required, as on the POS: a method with refRequired needs a non-blank reference (labelled by the method's refText, e.g. "Cheque number"), and a bank-transfer method with transferReceiptRequired needs an attached receipt. A payment missing either is rejected with 422 (reference / receipt_file_id). As Apps cannot attach receipts, a method that requires one cannot be used from an App.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

Purchase order id.

Body Params
string
required
length ≤ 191

A configured payment-method key (e.g. cash, card, cheque, bank-transfer).

number
required
≥ 0.01

In company currency.

string | null

Payment date as Y-m-d in company time; defaults to today. Future dates are rejected with 422.

string | null
string | null
Headers
string
required

The merchant install this request acts on (install.store_id from the app.installed webhook).

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json