All URIs are relative to https://rest.clicksend.com/v3
| Method | HTTP request | Description |
|---|---|---|
| rechargeCreditCardGet | GET /recharge/credit-card | Get Credit Card info |
| rechargeCreditCardPut | PUT /recharge/credit-card | Update credit card info |
| rechargePackagesGet | GET /recharge/packages | Get list of all packages |
| rechargePurchaseByPackageIdPut | PUT /recharge/purchase/{package_id} | Purchase a package |
| rechargeTransactionsByTransactionIdGet | GET /recharge/transactions/{transaction_id} | Get specific Transaction |
| rechargeTransactionsGet | GET /recharge/transactions | Purchase a package |
string rechargeCreditCardGet()
Get Credit Card info
Get Credit Card info
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->rechargeCreditCardGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargeCreditCardGet: ', $e->getMessage(), PHP_EOL;
}
?>This endpoint does not need any parameter.
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string rechargeCreditCardPut($body)
Update credit card info
Update credit card info
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \ClickSend\Model\CreditCard(); // \ClickSend\Model\CreditCard | CreditCard model
try {
$result = $apiInstance->rechargeCreditCardPut($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargeCreditCardPut: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \ClickSend\Model\CreditCard | CreditCard model |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string rechargePackagesGet($country)
Get list of all packages
Get list of all packages
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$country = "country_example"; // string | Country code
try {
$result = $apiInstance->rechargePackagesGet($country);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargePackagesGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| country | string | Country code | [optional] |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string rechargePurchaseByPackageIdPut($package_id)
Purchase a package
Purchase a package
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$package_id = 56; // int | ID of package to purchase
try {
$result = $apiInstance->rechargePurchaseByPackageIdPut($package_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargePurchaseByPackageIdPut: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| package_id | int | ID of package to purchase |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string rechargeTransactionsByTransactionIdGet($transaction_id)
Get specific Transaction
Get specific Transaction
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$transaction_id = "transaction_id_example"; // string | ID of transaction to retrieve
try {
$result = $apiInstance->rechargeTransactionsByTransactionIdGet($transaction_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargeTransactionsByTransactionIdGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| transaction_id | string | ID of transaction to retrieve |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string rechargeTransactionsGet($page, $limit)
Purchase a package
Get all transactions
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new ClickSend\Api\AccountRechargeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 1; // int | Page number
$limit = 10; // int | Number of records per page
try {
$result = $apiInstance->rechargeTransactionsGet($page, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRechargeApi->rechargeTransactionsGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number | [optional] [default to 1] |
| limit | int | Number of records per page | [optional] [default to 10] |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]