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.

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access token

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.

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access token

Request Body

NameTypeDescription

<method_key>-status*

string

Need to add all available payment method status to update. formate: <method_key>-status:1 or 0

<method_key>-status*

string

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

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.

Query Parameters

NameTypeDescription

method

string

Payment method key name

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access token

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.

Headers

NameTypeDescription

apikey*

string

apikey

Authorization*

string

Bearer access token

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.

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access token

Request Body

NameTypeDescription

fields*

string

Required fields for the payment method.

method*

string

Payment method key.

token_field*

string

Get token through mail when Get Checksum Token endpoint is called.

token_checksum_field*

string

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

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.

Query Parameters

NameTypeDescription

offset

string

limit

string

currency_code

string

wallet

string

wallet1, walle2, ...

type

string

all, active, reject, completed, cancelled

status

string

0: 'Requested',1: 'Processing' ,2: 'Paid',3: 'Rejected / Pay later',4: 'Spam' ,5: 'Removed', 6: 'Cancelled'

from_date

string

fromate: mm/dd/yyyy

to_date

string

fromate: mm/dd/yyyy

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Beaere access token

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.

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access token

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

NameTypeDescription

wallet

string

Key of wallet you were selected.

currency_code

string

Currency code

Headers

NameTypeDescription

apikey*

string

apikey

Authorization*

string

Bearer access token

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.

Headers

NameTypeDescription

apikey*

string

apikey

Authorization*

string

Bearer access token

Request Body

NameTypeDescription

form_key*

string

Get form key through the (Form Key) endpoint.

currency_code*

string

Currency code

wallet*

string

wallet key

method*

string

payment method key

amount*

string

withdraw amount

token_field*

string

mail token

token_checksum_field*

string

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

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.

Query Parameters

NameTypeDescription

wallet*

string

Wallet name eg:wallet1,wallet2,.....

payout_id*

string

Withdrawal request-id.

Headers

NameTypeDescription

apikey*

string

Apikey

Authorization*

string

Bearer access 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': '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.

Last updated