API : Payment

Payment API


Get Payment list

POST /api/payment/list

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value. Not username
api_key Y api_key for the above Userid
ispid N ISP ID
resellerid N Reseller ID
paymentid N Payment ID
customerid N Customer ID
serviceid N Service ID
userid N Payment Collected UserID
receiptno N Receipt Number numerical digits
prefix N Receipt Number Prefix
suffix N Receipt Number Suffix
mode N Payment Mode. Allowed values: Cash, Cheque, DD, Card, Bank, Online
status N Payment Status. Allowed values: Paid, Cancelled, CancelRequest
amt N Paid Amt. Accepted Comparison Operators, like: <50, ≤10, ≥80, =100, etc.
paid_from N Paid from date in yyyy-mm-dd format
paid_upto N Paid upto date in yyyy-mm-dd format
rows_limit N Limit the number of records in result set. Default: 10, Max value: 100
rows_offset N Fetch records from this offset position. Default: 0
sort_field N Sorts the result. Sort field should be any one of: id, ispid, resellerid, serviceid, userid. Default: id
sort_order N Sort order. Allowed values are: asc, desc. Default: asc
show_count N Shows Records Count only, instead of detailed results. This will ignore rows_limit, rows_offset. Allowed values are: 0, 1. Default: 0

Typical API Call

curl -X POST $BASE_URL/api/payment/list -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d status="Cancelled" -d paid_from="2020-01-01" -d show_count=1

The typical API Response will be

{
    "result": 4,
    "error": null
}

Make Payment

POST /api/payment/new

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value. Not username
api_key Y api_key for the above Userid
serviceid Y Service ID to make Payment
amt Y Payment Amt
mode Y Payment Mode. Allowed values: Cash, Cheque, DD, Card, Bank, Online
payment_date N Payment date in yyyy-mm-dd format. Default: Today's date
ref N Your Txn Referance details. Max 255 characters.

Typical API Call

curl -X POST $BASE_URL/api/payment/new -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d serviceid=1541 -d amt=100 -d mode="Cash"

The typical API Response will be

{
    "result": 3752,
    "error": null
}

Returns new paymentid upon success. If payment was failed result contains null value, and error contains error description.