Add New Payment

POST/api/payments

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
invoiceid String Mandatory Invoice ID associated with the payment.
amount String Mandatory Payment amount.
paymentmode String Mandatory Payment mode (e.g., cash, credit card, etc.).
paymentmethod String optional Optional Payment method details.
note String optional Optional Additional payment note.
transactionid String optional Optional Transaction ID.
custom_fields String optional Optional Custom fields data.
curl -X POST "https://yoursite.com/api/payments" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "invoiceid": "...", "amount": "...", "paymentmode": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "paymentmode": true,
  "message": "Payment add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "paymentmode": false,
  "message": "Payment add fail."
}
MethodPOST
Path/api/payments
GroupPayments
Sincev0.0.0
Defined inmodules/api/controllers/Payments.php