Add New Payment
POST/api/payments
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| 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."
}