1. Go to this page and download the library: Download capitalpayments/sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
capitalpayments / sdk example snippets
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
$response = $Sdk->login();
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the environment : response >= int $sandobox (0 or 1)
$response = $Sdk->getEnvironment();
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the account data
$response = $Sdk->getAccount();
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the balance from the api
$response = $Sdk->getBalance();
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get main wallet data (private key is
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# retrives all wallets attached to api
$response = $Sdk->getWallets();
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# retrieve the invoice data
$response = $Sdk->createInvoice([
'invoice_id' => 'invoice_id' # string
'amount' => 'amount' # float|int
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the invoice status
$response = $Sdk->getInvoiceStatus([
'invoice_id' => 'invoice_id' # string
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the invoice status
$response = $Sdk->cancelInvoice([
'invoice_id' => 'invoice_id' # string
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# retrieve the payout data
$response = $Sdk->createPayout([
'payout_id' => 'payout_id' # string
'amount' => 'amount' # float|int
'address' => 'USDT.TRC20WalletAddress' # string
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# get the payout status
$response = $Sdk->getPayoutStatus([
'payout_id' => 'payout_id' # string
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# set invoice as payed (it will takes 5 minutes to complete the payment invoice process)
$response = $Sdk->setTestInvoiceAsPayed([
'invoice_id' => 'InvioceID-InvoiceNumber1', # @string
]);
new CapitalPayments\Sdk\Sdk('api_key','api_secret');
# set deposit wallet
$response = $Sdk->setDepositWallet([
'address' => 'USDT.TRC20_WALLET_ADDRESS', # @string
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.