Payments processing through Mercatox Internal Transactions
To start receiving payments using our merchants:
Register on mercatox.com
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 https://mercatox.com/api/<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 ))
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. |
{ "data": { "status": "success", "public": "YOUR PUBLIC KEY", "order_id": "YOUR ORDER ID", "request_id": "MXP_00000000000000000000000000" }, "signature": "LdSirdyr48DBdA1pzb+W6rQFqAM=" }
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. |