LocalCAG Merchant
Navigation
How It Works
Using the LocalCAG merchant, you can generate cryptocurrency addresses for paying for an order and perform processing of the payment.
Setup
To set up the LocalCAG merchant, go to "Application Settings" - "LocalCAG (API) Merchant". You can enter a secret key that will be sent in the "X-Authorization" HTTP header.
Request Example
curl -X POST 'YOUR.HOST' \
--header 'X-Authorization: SECRET_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode '0=5748538111b2ce0871ee4810df3f85f7' \
--data-urlencode '1=1000' \
--data-urlencode '2=DAI' \
--data-urlencode '3=8' \
--data-urlencode '4=DAI'
# | Description |
---|---|
0 | Order Token |
1 | Amount |
2 | Currency Code |
3 | Currency Decimal |
4 | Currency Slug |
Response Example
Successful Response:
{
"success": true,
"result": {
"merchant_local_cag_address": "0x0000000000000000000000000000000000000000"
}
}
Parameter | Description |
---|---|
merchant_local_cag_address | Deposit Address |
merchant_local_cag_dest_tag | Destination Tag (optional) |
Failed Response:
{
"success": false,
"result": false
}
After processing the payment, it is necessary to send a POST request to the URL of the exchanger "YOUR.DOMAIN/merchant-process/local-cag" in order to change the status of the order to "Paid".
curl -X POST 'https://demo.exchanger-cms.com/merchant-process/local-cag' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'amount=1000' \
--data-urlencode 'currency=DAI' \
--data-urlencode 'order_token=5748538111b2ce0871ee4810df3f85f7' \
--data-urlencode 'txn=success_123' \
--data-urlencode 'sign=7cc51cba32fa11732065caee398aeb956fb88b0ca8069f050854a632900f5d37'
Parameter | Description |
---|---|
amount | Amount |
currency | Currency Code |
order_token | Order Token |
txn | Transaction ID |
sign | Sign SHA256(amount:currency:order_token:txn:SECRET_KEY) |
Work Documentation
For Developers
We work without days off 10:00 - 20:00 (GMT+3)
© 2018 - 2023 Made with Exchanger CMS