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.
invoiceIntegerInvoice number.No0

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
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

http://enswitch.example.com/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":"" } }

Change history

VersionChanges
3.13Function added.