Custom Merchant
Operation Principle

Using a custom merchant, you can independently generate credentials, HTML forms, payment request links, and further process payments.

Configuration

To configure a custom merchant, go to the "Application Settings" - "Custom Merchant Configuration (API)". You need to create a secret key that will be sent in the HTTP header "X-Authorization" and used for generating a digital signature.

Sample Request
curl -X POST 'https://YOUR.HOST' \

    --header 'X-Authorization: SECRET_KEY' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode '0=127.0.0.1' \
    --data-urlencode '1=52a840d46a0c8680234f4e3a99112e5c' \
    --data-urlencode '2=1054441680' \
    --data-urlencode '3=10500.43' \
    --data-urlencode '4=2' \
    --data-urlencode '5=UAH' \
    --data-urlencode '6=CARDUAH' \
    --data-urlencode '7=4000000000000010'
Parameter Description
0 User IP
1 Order Token
2 Merchant ID
3 Amount To Pay
4 Currency Decimals
5 Currency Code
6 Currency Slug
7 User Payment Details
Sample Response

Successful response (link):

{

    "success": true,
    "result": {
        "link": "https://exchanger-cms.com"
    }
}

Successful response (cryptocurrency address):

{

    "success": true,
    "result": {
        "address": "0x0000000000",
        "tag": ""
    }
}

Successful response (payment details):

{

    "success": true,
    "result": {
        "detail": "4000000000000000"
    }
}

Successful response (HTML form):

{

    "success": true,
    "result": {
        "action": "https://exchanger-cms.com",
        "keys": ["key"],
        "values": ["val"]
    }
}

Unsuccessful response:

{

    "success": false,
    "message": "Optional error message."
}

After processing the payment, you need to send a POST request to the exchange URL to change the request status to "Paid".

curl -X POST 'https://YOUR.DOMAIN/merchant-process/custom' \

    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'token=52a840d46a0c8680234f4e3a99112e5c' \
    --data-urlencode 'amount=10500.43' \
    --data-urlencode 'currency=UAH' \
    --data-urlencode 'txn=12345' \
    --data-urlencode 'sign=7cc51cba32fa11732065caee398aeb956fb88b0ca8069f050854a632900f5d37'
Parameter Description
token Order Token
amount Payment Amount
currency Payment Currency Code
txn Payment Transaction ID
sign Digital Signature SHA256(token:amount:currency:txn:SECRET_KEY)
We work without days off 10:00 - 20:00 (GMT+3)
© 2018 - 2024 Made with Exchanger CMS