Purchasing Manager API · pos

Record money paid to a supplier against what one or more of its purchase orders owe

POST /supplier-payments

Record money paid to a supplier against what one or more of its purchase orders owe, in the currency they billed: allocations names each order (poId, once each) and its share in currency; the payment is their sum.

Each order's payables shows what its supplier invoice and landed costs billed in each currency and what payments have settled; a share above what its order still owes there is 409 SupplierOverpayment, orders placed with different suppliers are 409 SupplierPaymentMixesSuppliers, and an unknown order is 404 PoNotFound. Any order that owes, closed ones included, takes a payment. The rate is captured on the fact: homeAmountCents, what the payment cost in the home currency as the bank charged it, books it at that actual rate (409 SupplierPaymentHomeMismatch when the payment is in the home currency and the two differ); omitted, the reference rate for paidOn (the day the money left, today when omitted) — 503 InventoryUnavailable when no rate is published, never a made-up one. remittance is the bank's or remittance advice's reference, kept verbatim, and method says how the money went (bank transfer, card, cheque, cash, direct debit or other). Appends purchasing.supplier-payment-recorded, which adds the payment to each order's payments; accounting relieves each order's payable at the home amount its invoice booked, credits 1195 supplier payments clearing with the payment at its own rate and posts the difference to 7100 realised exchange. paymentId, a caller-minted spay_…, is required and is the idempotency key: a retry with the same id is acknowledged and answers the payment as first recorded, appending nothing and asking no rate.

Access

Requires payments:write.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

paymentId, a caller-minted spay_…, is required and is the idempotency key: a retry with the same id is acknowledged and answers the payment as first recorded, appending nothing and asking no rate.

A retry with the same key answers 200, with what the first call recorded.

Why every write carries a key: Idempotency and retries.

Facts appended

  • purchasing.supplier-payment-recorded

What a fact is: Facts and the journal.

AI agent tool

Agents call this as purchasing_settle_supplier_invoices (Purchasing: Settle supplier invoices), in the accounting toolset.

Connecting an agent: AI agents.

Example

curl
curl -X POST 'https://purchasing.getmanifold.io/supplier-payments' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "paymentId": "spay_01a14c85-ce80-7b12-9329-9bd3b91535bf",
  "currency": "AUD",
  "allocations": [
    {
      "poId": "po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d",
      "amountCents": 60400
    }
  ],
  "method": "bank-transfer",
  "paidOn": "2026-10-31",
  "remittance": "EFT 4471-0931"
}'
JavaScript (fetch)
const response = await fetch("https://purchasing.getmanifold.io/supplier-payments", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "paymentId": "spay_01a14c85-ce80-7b12-9329-9bd3b91535bf",
    "currency": "AUD",
    "allocations": [
      {
        "poId": "po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d",
        "amountCents": 60400
      }
    ],
    "method": "bank-transfer",
    "paidOn": "2026-10-31",
    "remittance": "EFT 4471-0931"
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "paymentId": "spay_01a14c85-ce80-7b12-9329-9bd3b91535bf",
  "currency": "AUD",
  "allocations": [
    {
      "poId": "po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d",
      "amountCents": 60400
    }
  ],
  "method": "bank-transfer",
  "paidOn": "2026-10-31",
  "remittance": "EFT 4471-0931"
}
Response · 200 · application/json
{
  "paymentId": "spay_01a14c85-ce80-7b12-9329-9bd3b91535bf",
  "supplier": "Northwind Components",
  "supplierId": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
  "currency": "AUD",
  "amountCents": 60400,
  "paidOn": "2026-10-31",
  "method": "bank-transfer",
  "remittance": "EFT 4471-0931",
  "fx": {
    "currency": "AUD",
    "home": "AUD",
    "rate": 1,
    "rateDate": "2026-10-31",
    "source": "same"
  },
  "allocations": [
    {
      "poId": "po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d",
      "amountCents": 60400
    }
  ],
  "recordedAt": "2026-10-31T02:10:00.000Z"
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: purchasing-manager.openapi.json. Base URL https://purchasing.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

404

RefusalWhat it meansWhat to do
PoNotFound poId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
SupplierOverpayment poId, currency, outstandingCents, requestedCents The payment is more than the supplier is still owed. outstandingCents says how much.Pay at most what is outstanding.
SupplierPaymentMixesSuppliers poIds The payment covers purchase orders from more than one supplier.Pay each supplier separately.
SupplierPaymentHomeMismatch amountCents, homeAmountCents The home-currency amount does not match the payment's amount.Send amounts in step.
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

502

RefusalWhat it meansWhat to do
InventoryUnavailable reason The inventory service did not answer, so nothing changed.Send the same request again, with the same key.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again, with the same key.

How refusals work everywhere: Errors.