Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Record a payment on an invoice

Any signed in user. Adds one payment to a supplier invoice and advances the paid amount. The amount must be positive, and the invoice reads as paid once payments cover its total.

POST/api/v1/supplier-finance/invoices/{invoiceId}/payments
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Path parameters
invoiceIdstringrequired

The supplier invoice the payment belongs to.

Request body
requiredapplication/json
amountnumberrequired
methodstring
referencestring
Responses
200

The invoice with the payment applied

idstringrequired
supplier_idstringrequired
branch_idstringrequired
invoice_nostringrequired
total_amountnumberrequired
paid_amountnumberrequired
statusstringrequired
due_datestring | nullrequired
notesstringrequired
created_bystringrequired
created_atstringrequired
400

amount must be positive

detailstringrequired
401

Not authenticated

detailstringrequired
404

Supplier invoice not found

detailstringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/supplier-finance/invoices/string/payments' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 0,
  "method": "string",
  "reference": "string"
}'
Response
{
  "id": "string",
  "supplier_id": "string",
  "branch_id": "string",
  "invoice_no": "string",
  "total_amount": 0,
  "paid_amount": 0,
  "status": "string",
  "due_date": "string",
  "notes": "string",
  "created_by": "string",
  "created_at": "string"
}