logo.png customers/topup/request JSON API function

JSON API » customers » customers/topup/request

Requests that a topup be done for a prepaid customer. If credit card integration is configured, this will be processed automatically. If not, a request is made to the parent reseller.

Input parameters

Requires authentication and the payment role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
amountDecimalAmount to top up by, including taxes.Yes
idIntegerID of customer to top up.NoCustomer of authentication user.
invoiceIntegerAn invoice number to send to PayPal.No0

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The customer does not exist, or you do not have permission to update it.

Data returned

The status and any error messages of the attempted topup.

Example: With required parameters

https://www.015pbx.net/local/api/json/customers/topup/request/?auth_username=user;auth_password=password;amount=10.00

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "status":"accepted", "error":"", "message":"" } }