Mercatox Internal Transfer

Payments processing through Mercatox Internal Transactions

To start receiving payments using our merchants:

  • Register on

  • Go to merchant page

  • Create new merchant

  • Get your public and private keys in "Settings" of your merchant

To work with the API send POST request to URL<METHOD_NAME> with two parameters data and signature, where:

data - result of function base64_encode($json_string)

signature - result of function base64_encode(sha1( $private_key . $data . $private_key, 1 ))

Method: inner-transfer
Building data request parameter:
Parameter Required Type Description
public string Your merchant public key
action enum [get, pay]

get method generates payment request, pay transfers funds from merchant holder's account to specified address (described below)
address string MERCATOX E-Wallet ID. Required if pay action specified
amount float(8) Amount of operation. Must be bigger than 0.00000001.
currency string You can found available currencies in your E-Wallet. Warning! Use short names of currencies instead of full names (for example, BTC is correct, Bitcoin incorrect. DOGE is correct, Dogecoin incorrect, etc)
order_id string(100) You have to specify order_id. We will send it in callback when payment status will be changed (payed, failed, etc)
description string(70) Shortly describe your payment request. It will be shown to user on payment confirmation page.

If your request was successful, server will response you like:

get: {"status": "success", "request_id":"MXP_00000000000000000000000000","url":""}
pay: {"status": "success", "order_id": "1234567890", "address": "MX0123456789abcdef0000"}

You have to redirect client to the URL that will be specified in server response. After payment we will send you callback with data and signature params on URL that you have specified in you merchant panel with following info:

    "data": {
        "status": "success",
        "public": "YOUR PUBLIC KEY",
        "order_id": "YOUR ORDER ID",
        "request_id": "MXP_00000000000000000000000000"
    "signature": "LdSirdyr48DBdA1pzb+W6rQFqAM="

Signature - string based on your private key and data of callback: base64_encode(sha1( $private_key . $_POST['data'] . $private_key, 1 ))

WARNING! You should to check the signature of callbacks on your server for preventing hacker attacks and other frustrating moments.

Return codes and errors:
Example of error: {"status": "error", "code": 405, "message": "Method not allowed."}

Code Message
405 Method not allowed.
403 Data or Signature not specified.
406 Signature is invalid.
407 Merchant disabled.
913 Action not found.
903 You have to specify all required parameters.
902 Amount is not numeric.
906 Amount is too low.
901 Check currency ID.
905 Description is too long. Max length of description 70 chars.
900 Try again later or contact MERCATOX support.
907 E-Wallet not found. No such address in MERCATOX system
1001 Not enough funds.
1002 You can't send money yourself.
1003 You have reached daily limit for withdraws. Contact support to increase your limit.
500 Internal server error.