Payout

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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Response
200: OK
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
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Body Parameters
<method_key>-status
required
string
Need to add all available payment method status to update. formate: <method_key>-status:1 or 0
<method_key>-status
required
string
example: bank-status:1 paypal-status:0
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

<method_key>-status

<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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
method
required
string
Payment method key name
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

method

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.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access token
Response
200: OK
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
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Body Parameters
fields
optional
string
Required fields for the payment method.
method
required
string
Payment method key.
token_field
required
string
Get token through mail when Get Checksum Token endpoint is called.
token_checksum_field
required
string
Get checksum token through the response of Get Checksum Token endpoint.
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

method

This field is required.

This field is may not be blank.

Requested method is not found.

Requested method is not activated.

400

Validation Error

token_field

This field is required.

This field is may not be blank.

400

Validation Error

token_checksum_field

This field is required.

This field is may not be blank.

400

Validation Error

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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Beaere access token
Query Parameters
offset
optional
string
​
limit
optional
string
​
currency_code
optional
string
​
wallet
optional
string
wallet1, walle2, ...
type
optional
string
all, active, reject, completed, cancelled
status
optional
string
0: 'Requested',1: 'Processing' ,2: 'Paid',3: 'Rejected / Pay later',4: 'Spam' ,5: 'Removed', 6: 'Cancelled'
from_date
optional
string
fromate: mm/dd/yyyy
to_date
optional
string
fromate: mm/dd/yyyy
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

currency_code

Invalid Currency Code.

400

Validation Error

from_date

Invalid date format

400

Validation Error

to_date

Invalid date format

400

Validation Error

status

Invalid status value.

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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Response
200: OK
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.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access token
Query Parameters
wallet
required
string
Key of wallet you were selected.
currency_code
optional
string
Currency code
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

wallet

This field may not be blank.

400

Validation Error

wallet

Wallet withdrawal is disabled, Please contact your admin.

400

Validation Error

currency_code

Invalid Currency Code.

Request Payout

post
​

β€Žhttps://<domain>/<api prefix>/<version>/user/withdraw/request/
This API endpoint will create a withdrawal request.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access token
Body Parameters
form_key
required
string
Get form key through the (Form Key) endpoint.
currency_code
optional
string
Currency code
wallet
required
string
wallet key
method
required
string
payment method key
amount
required
string
withdraw amount
token_field
required
string
mail token
token_checksum_field
required
string
token checksum - response of Get Checksum Token
Response
200: OK
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

Status Code

Error Type

Field

Description

400

Validation Error

currency_code

Invalid Currency Code.

400

Validation Error

wallet

wallet is not defined.

Wallet withdrawal is disabled, Please contact your admin.

Already a request is pending.

Insufficient wallet balance.

400

Validation Error

amount

amount is not defined.

Please enter valid amount.

Minimum withdrawal amount is <min_amount>

Maximum withdrawal amount is <min_amount>

400

Validation Error

method

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

400

Validation Error

token_field

This field is required.

This field is may not be blank.

Token is not matching.

400

Validation Error

token_checksum_field

This field is required.

This field is may not be blank.

401

Request Failed

​

Payout Request History Failed.

Payout Request Failed.

400

Validation Error

form_key

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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
wallet
required
string
Wallet name eg:wallet1,wallet2,.....
payout_id
required
string
Withdrawal request-id.
Response
200: OK
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

Status Code

Error Type

Field

Description

400

οΏΌοΏΌValidation Error

wallet

This field is required.

This field may not be blank.

Invalid wallet.

400

οΏΌοΏΌValidation Error

payout_id

This field is required.

This field may not be blank.

Invalid payout id.

400

οΏΌοΏΌValidation Error

payout_id

Withdrawal request is invalid.

Withdrawal request is invalid.No transaction found.

​

​