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.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
amount | Decimal | Amount to top up by, including taxes. | Yes | |
id | Integer | ID of customer to top up. | No | Customer of authentication user. |
invoice | Integer | Invoice number. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The 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
Version | Changes |
---|---|
3.13 | Function added. |