Feel free to fork, modify & redistribute under the MIT license.
Via Composer
$ composer require remitano/remitano-phpOr clone this repository and include it in your project
Visit https://remitano.com/settings/api_key to create API key.
Visit https://remitano.com/settings/authenticator to get your authenticator secret.
Note: This is needed to perform actions which need 2FA authentication like withdrawals, otherwise, you won't need it.
$client = new Remitano\Api\RemitanoClient([
'apiKey' => 'your-api-key',
'apiSecret' => 'your-api-secret',
'authenticatorSecret' => 'your-authenticator-secret'
]);Visit https://developers.remitano.com/api-explorer - Merchant section for more information.
$merchant_charges = new Remitano\Api\Merchant\Charge($client);
$merchant_charges->get($id);- With coin currency:
$merchant_charges->create([
"coin_currency" => "usdt",
"coin_amount" => 10.99,
"cancelled_or_completed_callback_url" =>"https://example.com/payments/callback?id=example",
"description" => "Example charge"
]);Note: For now, we only support usdt as the price coin currency.
- With fiat:
We support fiat currency of 56 countries that Remitano are supporting, i.e.,
USD,AUD. (You could find entire list in our developer docs).
$merchant_charges->create([
"fiat_currency" => "AUD",
"fiat_amount" => 100.99,
"cancelled_or_completed_callback_url" =>"https://example.com/payments/callback?id=example",
"description" => "Example charge"
]);$merchant_withdrawals = new Remitano\Api\Merchant\Withdrawal($client);
$merchant_withdrawals->get($id);- Withdraw to external coin address
$merchant_withdrawals->create([
"merchant_withdrawal_ref" => "123",
"coin_currency" => "btc",
"coin_amount" => 1,
"receiver_pay_fee" => true,
"cancelled_or_completed_callback_url" => "http://sample.com/123/callback",
"coin_address" => "3CpwViK5RAMzT8AmaMFHVHyfoyQSwNPB6y"
]);- Withdraw to other remitano account
$merchant_withdrawals->create([
"merchant_withdrawal_ref" => "123",
"coin_currency" => "btc",
"coin_amount" => 1,
"receiver_pay_fee" => true,
"cancelled_or_completed_callback_url" => "http://sample.com/123/callback",
"remitano_username" => "receiver123",
"remitano_phone_number" => "+234 1 123 4567"
]);Whenever a charge is changed to completed or cancelled in our system:
- we will send a POST request to
charge.cancelled_or_completed_callback_urlwithremitano_idparam. - if user is still on our site, we will also redirect user to
object.cancelled_or_completed_callback_urlwithremitano_idparam (GET request).
After receiving these callbacks, you could call $merchant_charges->get($params['remitano_id']) to get the updated information and process accordingly.
Whenever a withdrawal is changed to completed or cancelled in our system:
- we will send a POST request to
withdrawal.cancelled_or_completed_callback_urlwithremitano_idparam.
After receiving these callbacks, you could call $merchant_withdrawals->get($params['remitano_id']) to get the updated information and process accordingly.
Visit https://developers.remitano.com/api-explorer for more API specs, APIs can be called directly by using method get, post, put of $client
$client->get('users/coin_accounts');
$client->post('offers/best', [
"country_code" => "my",
"offer_type" => "buy",
"coin_currency" => "btc",
"coin_amount" => 1
]);When receiving non 200-299 http code, an Error will be raised.
We have a Testnet at https://remidemo.com.
You could register an account there, then submit a request at this google form with your Remidemo username, so we could help to setup your testing account as a merchant.
After that, you could start your sandbox testing by setting ENV variable: putenv("REMITANO_SANDBOX=1").
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request