Get Payment Methods
GET
‎https://<domain>/<api prefix>/<version>/user/get/payment-methods/
This API endpoint will return a list of available payment methods with user active payment method status.
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"Payment_methods": [
{
"key": "<method_key>",
"name": "<method_name>",
"<method_key>-status": <user_active_status>
},
...
]
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/get/payment-methods/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>'
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/get/payment-methods/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array(),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Change Payment Method
POST
‎https://<domain>/<api prefix>/<version>/user/change/payment-method/
This API endpoint will change user payment method.
Request Body
Name | Type | Description |
---|
| | Need to add all available payment method status to update. formate: <method_key>-status:1 or 0 |
| | example:
bank-status:1
paypal-status:0 |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/user/change/payment-method/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>'
},
formData: {
'<method_key>-status': '<0 or 1>',
'<method_key>-status': '<0 or 1>',
...
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/change/payment-method/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('<method_key>-status' => '<0 or 1>','<method_key>-status' => '<0 or 1>',..),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | <method_key>-status field not found.
<method_key>-status value not found. <method_key>-status recieved a invalid value. |
Get Payment Method Settings
GET
‎https://<domain>/<api prefix>/<version>/user/get/payment-method/settings/
This API endpoint will return a payment method settings fields with value.
Query Parameters
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"label": "<method> Settings",
"fields": [
{
"field_name": "<field_name>",
"value": "<value>",
"required": <boolean>,
"max_length": <max_length>,
"min_length": <min_length>,
"srtipe": <boolean>,
"input_type": "<input_type>"
},
...
]
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/get/payment-method/settings/?method=<method_key>',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/get/payment-method/settings/?method=<method_key>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | This field is required. This field is may not be blank. Requested method is not found. Requested method is not activated. |
Get Checksum Token
GET
‎https://<domain>/<api prefix>/<version>/get/checksum-token/
This API endpoint will give a token to user mail and a checksum token in response.
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"success": 1,
"token_checksum": "<token_checksum>"
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/get/checksum-token/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
'Cookie': 'store_user=admin_store; sessionid=5zuhah7hbh4newylvnluxvpgt1clo0i1'
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/get/checksum-token/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array(),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Update Payment Method Settings
POST
‎https://<domain>/<api prefix>/<version>/user/update/payment-method/settings/
This API endpoint will update payment method configurations.
Request Body
Name | Type | Description |
---|
| | Required fields for the payment method. |
| | |
| | Get token through mail when Get Checksum Token endpoint is called. |
| | Get checksum token through the response of Get Checksum Token endpoint. |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/user/update/payment-method/settings/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>'
},
formData: {
'method': '<method_key>',
'token_field': '<token>',
'token_checksum_field': '<token_checksum>',
'<required_field_1>': '<field_value>',
'<required_field_2>': '<field_value>',
...
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/update/payment-method/settings/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => '<method_key>','token_field' => '<token>','token_checksum_field' => '<token_checksum>','<other_required_fields>' => '<field_values>',..),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | This field is required. This field is may not be blank. Requested method is not found. Requested method is not activated. |
| | | This field is required. This field is may not be blank. |
| | | This field is required. This field is may not be blank. |
| | other required fields for the payment method. | other fields validation errors. |
Payout History
GET
‎https://<domain>/<api prefix>/<version>/user/get/payout/history/
This API endpoint will return a list of payout history.
Query Parameters
Name | Type | Description |
---|
| | |
| | |
| | |
| | |
| | all, active, reject, completed, cancelled |
| | 0: 'Requested',1: 'Processing' ,2: 'Paid',3: 'Rejected / Pay later',4: 'Spam' ,5: 'Removed', 6: 'Cancelled' |
| | |
| | |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"results": [
{
"id": <id>,
"amount_requested": "<amount_requested>",
"charge": "<charge>",
"payable_amount": "<payable_amount>",
"status": {
"label": "<status_label>",
"color ": "<color>"
},
"payout_method": "<payout_method>",
"extra": {
"amount": <amount_requested>,
"charge": <charge>,
"amount_paid": <amount_paid>,
"payout_method": "<payout_method>",
"payout_wallet": "<payout_wallet>",
"payout_currency": "<payout_currency>"
},
"payable_converted_amount": "<Ƀ0.00075748>",
"process_date": "<process_date>"
}
...
],
"count": <list_count>,
"previous": <previous_page_url>,
"next": <next_page_url>
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/get/payout/history/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/get/payout/history/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
Request Payout
Get Payout Enabled Wallets
GET
‎https://<domain>/<api prefix>/<version>/user/withdraw/request/
This API endpoint will return a list of withdrawal enabled wallets.
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": [
{
"key": "<wallet_key>",
"name": "<Wallet_name>"
},
...
]
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>'
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Get Payment Methods
GET
‎https://<domain>/<api prefix>/<version>/user/withdraw/request/
This API endpoint will return a list of active payment methods and their details, under the selected wallet.
Query Parameters
Name | Type | Description |
---|
| | Key of wallet you were selected. |
| | |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"payout_methods_available": [
{
"key": "<method_key>",
"name": "<method_name>"
},
...
],
"payment_method_settings": [
[
{
"enable_wallet_withdrwal": <enabled_status>,
"payment_method": [
"<method_key>",
...
],
"available_roles": [
<available_roles>
],
"min_withdraw_amount": "<min_withdraw_amount>",
"max_withdraw_amount": "<max_withdraw_amount>",
"widraw_charge": "<widraw_charge>",
"widraw_charge_type": "<widraw_charge_type>",
"available_days": [
"All",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"payout_limit": "<payout_limit>",
"payout_limit_period": [
"<payout_limit_period>"
]
},
...
]
],
"currency_code": "<currency_code>",
"currency_rate_details": {
"decimals": <decimals>,
"symbol_placement": "<symbol_placement>",
"symbol": "<currency_symbol>",
"rate": <currency_convertion_rate>
},
"wallet_balance": <wallet_balance>
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | This field may not be blank. |
| | | Wallet withdrawal is disabled, Please contact your admin. |
| | | |
Request Payout
POST
‎https://<domain>/<api prefix>/<version>/user/withdraw/request/
This API endpoint will create a withdrawal request.
Request Body
Name | Type | Description |
---|
| | Get form key through the (Form Key) endpoint. |
| | |
| | |
| | |
| | |
| | |
| | token checksum - response of Get Checksum Token |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <acess token>'
},
formData: {
'method': '<payment_method>',
'wallet': '<wallet_key>',
'amount': '<amount>',
'token_field': '<mail_token>',
'token_checksum_field': '<token_checksum>'
'form_key':'<form_post_key>'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/withdraw/request/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => '<payment_method>','wallet' => '<wallet_key>','amount' => '<amount>','token_field' => '<mail_token>','token_checksum_field' => '<token_checksum>','form_key':'<form_post_key>'),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | |
| | | wallet is not defined. Wallet withdrawal is disabled, Please contact your admin. Already a request is pending. Insufficient wallet balance. |
| | | amount is not defined. Please enter valid amount. Minimum withdrawal amount is <min_amount> Maximum withdrawal amount is <min_amount> |
| | | method is not defined. Please choose a valid payout methods. Some encryption error occured. No account details found for this wallet. No payment method details found for this wallet. insufficient wallet balance. You can't create the request, your <payout_limit_period> balance is <max_formated_amount> Unable to continue this request, Please contact your administrator |
| | | This field is required. This field is may not be blank. Token is not matching. |
| | | This field is required. This field is may not be blank. |
| | | Payout Request History Failed. Payout Request Failed. |
| | | This field is required. This field is may not be blank. You have another form running, Please reload. |
Cancel Payout Request
DELETE
‎https://<domain>/<api prefix>/<version>/user/cancel/withdraw/request/
This API endpoint will cancel a payout request.
Query Parameters
Name | Type | Description |
---|
| | Wallet name eg:wallet1,wallet2,..... |
| | |
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://<domain>/<api prefix>/<version>/user/cancel/withdraw/request/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access tooken>',
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/cancel/withdraw/request/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
| | | |
| | | This field is required. This field may not be blank. Invalid wallet. |
| | | This field is required. This field may not be blank. Invalid payout id. |
| | | Withdrawal request is invalid. Withdrawal request is invalid.No transaction found. |