Manage Sub-account Credits
This request is used to manage sub-account credits.
Add Credits
URL
POST https://api.smspartner.fr/v1/subaccount/credit/add
Required Parameters
apiKey
credit
Amount of credit in Euros to add to the sub-account
tokenSubaccount
Sub-account identifier
Requests
<?php
// Prepare data for POST request
$fields = array(
'apiKey'=> 'YOUR API KEY',
'credit'=> '100',
'tokenSubaccount'=>'identifiant du sous-compte'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,'https://api.smspartner.fr/v1/subaccount/credit/add');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS,json_encode($fields));
$result = curl_exec($curl);
curl_close($curl);
// Process your response here
echo $result;
?>Response
Errors
Error Codes
1
API key is required
2
Credit amount is required
3
Sub-account identifier is required
4
You are not authorized
5
Credit to assign must be greater than 0
6
Your balance must be greater than 0
7
Sub-account does not exist
8
Insufficient credit
10
Invalid API key
200
Everything went well!
Remove Credits
URL
POST https://api.smspartner.fr/v1/subaccount/credit/remove
Required Parameters
apiKey
credit
Amount of credit in Euros to remove from the sub-account
tokenSubaccount
Sub-account identifier
Requests
Response
Errors
Error Codes
1
API key is required
2
Credit amount is required
3
Sub-account identifier is required
4
You are not authorized
5
Credit to assign must be greater than 0
6
Your balance must be greater than 0
7
Sub-account does not exist
8
Insufficient credit
10
Invalid API key
200
Everything went well!
Last updated