Crypto

Overview

Crypto is a payment method which allows you to accept payments from your customers and perform payouts to them. Customers make purchases by using cryptocurrency.

With the Crypto payment method, you can accept payments from your customers by using Payment Page and Gate and perform payouts to them by using Gate.

Download the logo in the vector format here.

Payment method type Crypto wallets
Countries and regions Contact your key account manager at Monetix for the information
Payment currencies EUR, RUB, USD, A7A5, BTC, DAI (BEP20), DAI (ERC20), ETH, LTC, TON, TRX, BNB, USDT (TON), USDT (Polygon), USDT (TRC20), USDT (ERC20), USDC (ERC20), USDC (Polygon)
Payment amount limits Contact your key account manager at Monetix for details. Also you can check the payment amount limits in your project by using Dashboard.
Currency conversion On the Monetix side
Purchase
Payout
Stored credentials payments
Refund
Notes

Purchase. Scenario 1: customer redirection:

Cryptocurrencies supported for purchase:
  • TRX and USDT (TRC20) on the TRON blockchain
  • ETH, USDT (ERC20), USDC (ERC20), and DAI (ERC20) on the Ethereum blockchain
  • BNB and DAI (BEP20) on the BSC blockchain
  • USDT (ERC20) and USDC (ERC20) on the Polygon blockchain
  • TON and USDT on the TON blockchain
  • BTC on the Bitcoin blockchain
  • LTC on the litecoin blockchain

Purchase. Scenario 2: payment instruction:

Cryptocurrencies supported for purchase:

  • TRX and USDT (TRC20) on the TRON blockchain
  • ETH, USDT (ERC20), and DAI (ERC20) on the Ethereum blockchain
  • BNB and DAI (BEP20) on the BSC blockchain
  • USDT (ERC20) on the Polygon blockchain
  • USDT on the TON blockchain
  • BTC on the Bitcoin blockchain
  • LTC on the litecoin blockchain

Payout. Scenario 1: payout from fiat balance:

Cryptocurrencies supported for payout:
  • USDT (TRC20) and USDT (ERC20) on the TRON, Ethereum, Polygon, and TON blockchains

Payout. Scenario 2: payout from deposit crypto balance:

Cryptocurrencies supported for payout:
  • TRX, USDT (TRC20), and A7A5 (TRC20) on the TRON blockchain
  • ETH, USDT (ERC20), and USDC (ERC20) on the Ethereum blockchain
  • BNB on the BSC blockchain
  • USDT (ERC20) and USDC (ERC20) on the Polygon blockchain
  • TON and USDT on the TON blockchain
  • BTC on the Bitcoin blockchain
  • LTC on the litecoin blockchain

Currency conversion is not available for this type of payout. Balance top up is done with a cryptocurrency to an individual balance for each cryptocurrency. Since the payment amount is sent in minor currency units–confirm with Monetix key account manager minor currency units for each cryptocurrency.

Onboarding and access fee Contact your key account manager at Monetix for details.

Operations support

Interfaces Basic time
Payment Page Gate Dashboard
Purchase (scenario 1) *
Purchase (scenario 2) *
Payout (scenario 1) *
Payout (scenario 2) *

* Contact your key account manager at Monetix for the information.

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section, and then click the Payment methods tab.

Purchase by using Payment Page. Scenario 1: customer redirection

General information

To perform a purchase by using Payment Page with the Crypto payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Accept the callback with the purchase result from the payment platform.

The following figure shows the complete purchase processing flow in the Crypto payment method.

Figure 1. Purchase processing steps for a purchase by using Payment Page
  1. The customer initiates a purchase in your system.
  2. Your system sends the request for the purchase through Payment Page to the Monetix URL.
  3. The checkout page is displayed to the customer.
  4. The customer chooses to make a purchase with the Crypto payment method.
  5. The payment platform processes the request and forwards it to the provider service.
  6. The provider service sends the customer redirection data to the payment platform.
  7. The checkout page redirects the customer to the provider service.
  8. The customer completes the purchase.
  9. The customer is redirected back to the checkout page.
  10. The provider service sends the purchase result information to the payment platform.
  11. The payment platform sends a callback with the payment result to your system.
  12. The payment platform displays the payment result to the customer on the checkout page.

Request

The following table lists the parameters that you need to include in the request for purchase through the checkout page with the Crypto payment method.

Table 1. Basic parameters of requests to Payment Page

strictly required—the parameter must be in the initial request.

optional—the parameter is optional but adding it to the request either makes the payment process more customer-friendly or helps to increase the percentage of successful payments.

ParameterDescription

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

customer_id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

customer_first_name
string
strictly required

Customer's first name.

Example: John

customer_last_name
string
strictly required

Customer's last name.

Example: Doe

customer_email
string
strictly required

Customer's email.

Example: johndoe@example.com

payment_currency
string
strictly required

Code of the payment currency in the ISO-4217 alpha-3 format.

Example: EUR

payment_amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 100.00 EUR must be sent as 10000

force_payment_method
string
optional

Parameter that allows you to enforce the Crypto payment method for your customer and skip the page with payment method selections.

To enforce the Crypto payment method and skip the page with payment method selection, add the force_payment_method parameter to the request and set its value to crypto. For more information about enforcing payment methods, see Preselecting payment methods.

Example: force_payment_method: 'crypto'

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.
You can also add any other optional parameters to the request, if necessary. For the list of all the parameters possible in requests to Payment Page, see Payment Page invocation parameters.

Here is an example of the data from a request to open the checkout page by using EPayWidget:

EPayWidget.run(
	{
		project_id: 1234,
		payment_id: 'payment_47',
		customer_id: 'customer_123',
		customer_first_name: 'John',
		customer_last_name: 'Doe',
		customer_email: 'johndoe@example.com',
		payment_currency: 'EUR',
		payment_amount: 10000,
		force_payment_method: 'crypto',
		signature: 'kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=='
	}
)

You can enforce a cryptocurrency for your customer on the checkout page. To do so, add the following parameters to the request for the checkout page opening:

Table 2. Parameters to enforce a cryptocurrency on the checkout page
Object/parameter Parameter Description

force_payment_method
string
optional

Parameter that allows you to enforce the Crypto payment method for your customer and skip the page with payment method selections.

Set the value of this parameter to crypto.

Example: force_payment_method: 'crypto'

payment_methods_options
object
optional

currency_id
string
optional

Cryptocurrency code (ticker).

Possible values:

  • BSC—for the BNB cryptocurrency on the BSC blockchain
  • BTC—for the BTC cryptocurrency on the Bitcoin blockchain
  • DAI_BEP20—for the DAI (BEP20) cryptocurrency on the BSC blockchain
  • DAI_ERC20—for the DAI (ERC20) cryptocurrency on the Ethereum blockchain
  • ETH—for the ETH cryptocurrency on the Ethereum blockchain
  • LTC—for the LTC cryptocurrency on the litecoin blockchain
  • TON—for the TON cryptocurrency on the TON blockchain
  • TRX—for the TRX cryptocurrency on the TRON blockchain
  • USDC_ERC20—for the USDC ( ERC20) cryptocurrency on the Ethereum blockchain
  • USDC_POLYGON—for the USDC cryptocurrency on the Polygon blockchain
  • USDT_ERC20—for the USDT (ERC20) cryptocurrency on the Ethereum blockchain
  • USDT_POLYGON—for the USDT cryptocurrency on the Polygon blockchain
  • USDT_TON—for the USDT cryptocurrency on the TON blockchain
  • USDT_TRC20—for the USDT (TRC20) cryptocurrency on the TRON blockchain

Example: BTC

Here is an example of the data from the request to open the checkout page with a cryptocurrency enforced for the customer:

EPayWidget.run(
	{
		project_id: 1234,
		payment_id: 'payment_47',
		customer_id: 'customer_123',
		customer_first_name: 'John',
		customer_last_name: 'Doe',
		customer_email: 'johndoe@example.com',
		payment_currency: 'EUR',
		payment_amount: 10000,
		force_payment_method: 'crypto',
		payment_methods_options: {"currency_id": ["BTC"]},
		signature: 'kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=='
	}
)

Callback

In the Crypto payment method, the payment platform returns the purchase result in a callback. For the information about the callback structure, see Callbacks in Payment Page.

The following is an example of a callback body with information about a successfully completed purchase.

Figure 2. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined purchase.

Figure 3. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Purchase by using Gate. Scenario 1: customer redirection

General information

To perform a purchase by using Gate with the Crypto payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Redirect the customer to the provider service.
  3. Accept the callback with the purchase result from the payment platform.

The following figure provides the details of the purchase processing flow in the Crypto payment method.

Figure 4. Purchase processing flow when performing a purchase by using Gate
  1. The customer initiates a purchase in your system.
  2. Your system sends the purchase request to the Monetix payment platform.
  3. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response structure.)
  4. The payment platform processes the request and forwards it to the provider service.
  5. The provider service sends the customer redirection data to the payment platform.
  6. The payment platform forwards the data to your system in the redirect_data object.
  7. Your system redirects the customer to the provider service.
  8. The customer completes the purchase.
  9. The customer is redirected to your system.
  10. The provider service informs the payment platform about the purchase result.
  11. The payment platform sends the callback with the payment result to your system.
  12. Your system sends the payment result to the customer.

Request

This section provides the instructions on how to build the request for purchase with the Crypto payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/crypto/sale
Table 3. Basic parameters of a purchase request

strictly required—the parameter must be in the initial request.

optional—the parameter is optional but adding it to the request either makes the payment process more customer-friendly or helps to increase the percentage of successful payments.

Object Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

first_name
string
strictly required

Customer's first name.

Example: John

last_name
string
strictly required

Customer's last name.

Example: Doe

email
string
strictly required

Customer's email.

Example: johndoe@example.com

payment
object
strictly required

currency
string
strictly required

Code of the payment currency in the ISO-4217 alpha-3 format.

Example: EUR

amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 100.00 EUR must be sent as 10000

crypto_currency
string
optional

Cryptocurrency code (ticker). May be passed in the request along with the crypto_payway parameter to preselect the cryptocurrency for the customer. If not passed, the customer will have to choose the cryptocurrency themselves while making the payment. Reach out to your key account manager at Monetix to find out whether cryptocurrency preselection is available in your case.

Possible values:

  • BNB—for the BNB cryptocurrency
  • BTC—for the BTC cryptocurrency
  • DAI—for the DAI cryptocurrency
  • ETH—for the ETH cryptocurrency
  • LTC—for the LTC cryptocurrency
  • TON—for the TON cryptocurrency
  • TRX—for the TRX cryptocurrency
  • USDC—for the USDC cryptocurrency
  • USDT—for the USDT cryptocurrency

Example: USDT

crypto_payway
string
optional

This parameter indicates the blockchain where the cryptocurrency is stored. May be passed in the request along with the crypto_currency parameter to enforce the particular cryptocurrency for your customer and skip the page with cryptocurrency selections. If not passed, the customer will have to choose the cryptocurrency themselves while making the payment. Reach out to your key account manager at Monetix to find out whether cryptocurrency preselection is available in your case.

Possible values:

  • BITCOIN—when submitting the BTC cryptocurrency on the Bitcoin blockchain
  • BSC—when submitting the BNB and DAI (BEP20) cryptocurrency on the BSC blockchain
  • ERC20—when submitting the USDT and USDC cryptocurrency on the Ethereum blockchain
  • ETHEREUM—when submitting the ETH, USDT (ERC20) and USDC (ERC20) cryptocurrency on the Ethereum blockchain
  • LITECOIN—when submitting the LTC cryptocurrency on the litecoin blockchain
  • POLYGON—when submitting the USDT (ERC20) and USDC (ERC20) cryptocurrency on the Polygon blockchain
  • TON—when submitting the TON and USDT cryptocurrency on the TON blockchain
  • TRC20—when submitting the USDT and USDC cryptocurrency on the TRON blockchain
  • TRON—when submitting the TRX and USDT (TRC20) cryptocurrency on the TRON blockchain

Example: TRC20

return_url
object
optional

success
string
optional

The URL to redirect the customer to after the payment is successfully completed.

Example: https://example.com/success/

decline
string
optional

The URL to redirect the customer to after the payment is declined.

Example: https://example.com/decline/

return
string
optional

The URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the success and decline parameters are not specified in the request. If you don't specify any parameters of the return_url object in the request, by default Gate will redirect the customer to the URL specified in your project in Monetix.

Example: https://example.com/return/

You can also add any other optional parameters to the purchase request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a purchase with the Crypto payment method:

Figure 5. Example of the purchase request body
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "payment": {
        "currency": "EUR",
        "amount": 10000,
        "crypto_currency": "USDT",
        "crypto_payway": "TRC20"
    },
    "return_url": {
        "success": "https://example.com/success/",
        "decline": "https://example.com/decline/",
        "return": "https://example.com/return/"
    }
}

Customer redirection

After receiving and processing your purchase request, the payment platform sends you the callback with the data for redirecting the customer to the provider service.

To redirect the customer, use the values of the following parameters in the redirect_data object:

  • url—the URL to redirect the customer to
  • body—the data to send in the request body
  • method—the HTTP method for retrieving the website page (for example, POST or GET)
  • encrypted—this is the service parameter. Ignore it.

Here is an example of the callback snippet with the data to redirect the customer.

"redirect_data": {
    "method": "POST",
    "body": {
        "example_parameter_1": "value_1",
        "example_parameter_2": "value_2"
    },
    "encrypted": [],
    "url": "https://example.com/redirect"
}

Callback

In the Crypto payment method, the payment platform returns the purchase result in a callback. For the information about the callback structure, see Callbacks in Gate.

The following is an example of a callback body with the information about a successfully completed purchase.

Figure 6. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined purchase.

Figure 7. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Purchase by using Gate. Scenario 2: payment instruction

General information

To perform a purchase by using Gate with the Crypto payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Show the screen with payment instructions to the customer.
  3. Accept the callback with the purchase result from the payment platform.

The following figure provides the details of the purchase processing flow in the Crypto payment method.

Figure 8. Purchase processing flow when performing a purchase by using Gate
  1. The customer initiates a purchase in your system.
  2. Your system sends the purchase request to the Monetix payment platform.
  3. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response structure.)
  4. The payment platform processes the request and forwards it to the provider service.
  5. The provider service generates the payment instructions to show to the customer and sends them to the payment platform.
  6. The payment platform forwards the instructions to your system in the display_data array.
  7. Your system displays the payment instructions to the customer.
  8. The customer completes the purchase.
  9. The provider service informs the payment platform about the purchase result.
  10. The payment platform sends the callback with the payment result to your system.
  11. Your system sends the payment result to the customer.

Request

This section provides the instructions on how to build the request for purchase with the Crypto payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/crypto/sale
Table 4. Basic parameters of a purchase request

strictly required—the parameter must be in the initial request.

optional—the parameter is optional but adding it to the request either makes the payment process more customer-friendly or helps to increase the percentage of successful payments.

Object Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

first_name
string
strictly required

Customer's first name.

Example: John

last_name
string
strictly required

Customer's last name.

Example: Doe

email
string
strictly required

Customer's email.

Example: johndoe@example.com

payment
object
strictly required

currency
string
strictly required

Code of the payment currency in the ISO-4217 alpha-3 format.

Example: EUR

amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 100.00 EUR must be sent as 10000

crypto_currency
string
optional

Cryptocurrency code (ticker). May be passed in the request along with the crypto_payway parameter to preselect the cryptocurrency for the customer. If not passed, the customer will have to choose the cryptocurrency themselves while making the payment. Reach out to your key account manager at Monetix to find out whether cryptocurrency preselection is available in your case.

Possible values:

  • BTC—for the BTC cryptocurrency
  • TRX—for the TRX cryptocurrency
  • ETH—for the ETH cryptocurrency
  • LTC—for the LTC cryptocurrency
  • BNB—for the BNB cryptocurrency
  • DAI—for the DAI cryptocurrency
  • USDT—for the USDT cryptocurrency

Example: USDT

crypto_payway
string
optional

This parameter indicates the blockchain where the cryptocurrency is stored. May be passed in the request along with the crypto_currency parameter to enforce the particular cryptocurrency for your customer and skip the page with cryptocurrency selections. If not passed, the customer will have to choose the cryptocurrency themselves while making the payment. Reach out to your key account manager at Monetix to find out whether cryptocurrency preselection is available in your case.

Possible values:

  • BITCOIN—when submitting the BTC cryptocurrency on the Bitcoin blockchain
  • BSC—when submitting the BNB and DAI (BEP20) cryptocurrency on the BSC blockchain
  • ERC20—when submitting the USDT cryptocurrency on the Ethereum blockchain
  • ETHEREUM—when submitting the ETH, USDT (ERC20) cryptocurrency on the Ethereum blockchain
  • LITECOIN—when submitting the LTC cryptocurrency on the litecoin blockchain
  • TRC20—when submitting the USDT cryptocurrency on the TRON blockchain
  • TRON—when submitting the TRX and USDT (TRC20) cryptocurrency on the TRON blockchain

Example: TRC20

You can also add any other optional parameters to the purchase request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a purchase with the Crypto payment method:

Figure 9. Example of the purchase request body
        "currency": "EUR",
        "amount": 10000,
        "crypto_currency": "USDT",
        "crypto_payway": "TRC20"
    }
}

Displaying the payment instructions to the customer

After receiving and processing your purchase request, the payment platform sends you the callback with the data for displaying the payment instructions to the customer.

Use the data from the display_data array to display the payment instructions to the customer.

Table 5. Description of the display_data array
Element Description
{
    "type": "add_info",
    "title": "init_amount",
    "data": "10000"
}
Purchase amount specified in your request.

Example: 10000

{
    "type": "add_info",
    "title": "init_currency",
    "data": "EUR"
}
Purchase currency specified in your request.

Example: EUR

{
    "type": "add_info",
    "title": "crypto_amount",
    "data": "0.003972"
}
Purchase amount converted to cryptocurrency.

Example: 0.003972

{
    "type": "add_info",
    "title": "crypto_currency",
    "data": "BTC (bitcoin)"
}
Cryptocurrency of the purchase.

Example: BTC (Bitcoin)

{
    "type": "add_info",
    "title": "crypto_account",
    "data": "bfqyjjcttjh7fhg5sl63652"
}
Account to be credited.

Example: bfqyjjcttjh7fhg5sl63652

{
    "type": "add_info",
    "title": "payment_id",
    "data": "312866350116803"
}
Operation ID.

Example: 312866350116803

{
    "type": "qr_data",
    "title": "qr_data",
    "data": "yt4352345675674677452345dfg"
}
Data to display the QR code to the customer.

Example: yt4352345675674677452345dfg

The following is the callback fragment containing display_data array.

"display_data": [
    {
        "type": "add_info",
        "title": "init_amount",
        "data": "10000"
    },
    {
        "type": "add_info",
        "title": "init_currency",
        "data": "EUR"
    },
    {
        "type": "add_info",
        "title": "crypto_amount",
        "data": "0.003972"
    },
    {
        "type": "add_info",
        "title": "crypto_currency",
        "data": "BTC (Bitcoin)"
    },
    {
        "type": "add_info",
        "title": "crypto_account",
        "data": "bfqyjjcttjh7fhg5sl63652"
    },
    {
        "type": "add_info",
        "title": "payment_id",
        "data": "312866350116803"
    },
    {
        "type": "qr_data",
        "title": "qr_data",
        "data": "yt4352345675674677452345dfg"
    }
]

Callback

In the Crypto payment method, the payment platform returns the purchase result in a callback. For the information about the callback structure, see Callbacks in Gate.

The following is an example of a callback body with the information about a successfully completed purchase.

Figure 10. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined purchase.

Figure 11. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "sale",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Related topics

Payout by using Gate. Scenario 1: payout from fiat balance

General information

To perform a payout by using Gate with the Crypto payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Accept the callback with the payout result from the payment platform.

The following picture provides the details of the payout processing flow in the Crypto payment method.

Figure 12. Payout processing flow when performing a payout by using Gate
  1. The customer initiates a payout in your system.
  2. Your system sends the payout request to the Monetix payment platform.
  3. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response structure.)
  4. The payment platform processes the request and forwards it to the provider service.
  5. The provider service informs the payment platform about the payout result.
  6. The payment platform sends a callback with the payout result to your system.
  7. Your system sends the payout result to the customer.

Request

This section provides the instructions on how to build the request for payout with the Crypto payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/crypto/payout
Table 6. Basic parameters of a payout request

strictly required—the parameter must be in the initial request.

Object Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

first_name
string
strictly required

Customer's first name.

Example: John

last_name
string
strictly required

Customer's last name.

Example: Doe

email
string
strictly required

Customer's email.

Example: johndoe@example.com

account
object
strictly required

wallet_address
string
strictly required

Cryptocurrency wallet address.

Example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2

crypto_currency
string
strictly required

Cryptocurrency code (ticker).

The value of this parameter is always equal to USDT.

Example: USDT

crypto_payway
string
strictly required

This parameter indicates the blockchain where the cryptocurrency is stored.

Possible values:

  • ERC20—for the USDT (ERC20) currency on the Ethereum blockchain
  • TRC20—for the USDT (TRC20) currency on the TRON blockchain

Example: TRC20

payment
object
strictly required

currency
string
strictly required

Code of the payment currency in the ISO-4217 alpha-3 format.

Example: EUR

amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 100.00 EUR must be sent as 10000

description
string
strictly required

Operation description.

Example: Payout description

You can also add any other optional parameters to the payout request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a payout with the Crypto payment method:

Figure 13. Example of the payout request body
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "account": {
        "wallet_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
        "crypto_currency": "USDT",
        "crypto_payway": "TRC20"
    },
    "payment": {
        "currency": "EUR",
        "amount": 10000,
        "description": "Payout description"
    }
}

Callback

In the Crypto payment method, the payment platform returns the payout result in a callback. For the information about the callback structure, see Callbacks in Gate.

The following is an example of a callback body with the information about a successfully completed payout.

Figure 14. Example of the data from a successful payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined payout.

Figure 15. Example of the data from a declined payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 10000,
            "currency": "EUR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "EUR"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "EUR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Payout by using Gate. Scenario 2: payout from deposit crypto balance

General information

To perform a payout by using Gate with the Crypto payment method:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Accept the callback with the payout result from the payment platform.

The following picture provides the details of the payout processing flow in the Crypto payment method.

Figure 16. Payout processing flow when performing a payout by using Gate
  1. The customer initiates a payout in your system.
  2. Your system sends the payout request to the Monetix payment platform.
  3. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response structure.)
  4. The payment platform processes the request and forwards it to the provider service.
  5. The provider service informs the payment platform about the payout result.
  6. The payment platform sends a callback with the payout result to your system.
  7. Your system sends the payout result to the customer.

Request

This section provides the instructions on how to build the request for payout with the Crypto payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/crypto/payout
Table 7. Basic parameters of a payout request

strictly required—the parameter must be in the initial request.

Object Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Monetix when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

first_name
string
strictly required

Customer's first name.

Example: John

last_name
string
strictly required

Customer's last name.

Example: Doe

email
string
strictly required

Customer's email.

Example: johndoe@example.com

account
object
strictly required

wallet_address
string
strictly required

Cryptocurrency wallet address.

Example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2

crypto_currency
string
strictly required

Cryptocurrency code (ticker).

The value of this parameter must be the same as the value of payment.currency parameter.

Possible values:

  • A7A5:TRC20—when submitting the A7A5 (TRC20) cryptocurrency on the TRON blockchain
  • BSC—when submitting the BNB cryptocurrency on the BSC blockchain
  • BTC—when submitting the BTC cryptocurrency on the Bitcoin blockchain
  • ETH—when submitting the ETH cryptocurrency on the Ethereum blockchain
  • LTC—when submitting the LTC cryptocurrency on the litecoin blockchain
  • TON—when submitting the TON cryptocurrency on the TON blockchain
  • TRX—when submitting the TRX cryptocurrency on the TRON blockchain
  • USDC:ERC20—when submitting the USDC ( ERC20) cryptocurrency on the Ethereum blockchain
  • USDC:polygon—when submitting the USDC (ERC20) cryptocurrency on the Polygon blockchain
  • USDT:ERC20—when submitting the USDT (ERC20) cryptocurrency on the Ethereum blockchain
  • USDT:polygon—when submitting the USDT (ERC20) cryptocurrency on the Polygon blockchain
  • USDT:ton—when submitting the USDT (TRC20) cryptocurrency on the TON blockchain
  • USDT:TRC20—when submitting the USDT (TRC20) cryptocurrency on the TRON blockchain

Example: TRX

payment
object
strictly required

currency
string
strictly required

Code of the payment currency.

The value of this parameter must be the same as the value of amount.crypto_currency parameter.

Example: TRX

amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency codes.

Example: 3 TRX must be sent as 3000000

You can also add any other optional parameters to the payout request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a payout with the Crypto payment method:

Figure 17. Example of the payout request body
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "account": {
        "wallet_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
        "crypto_currency": "TRX"
    },
    "payment": {
        "currency": "TRX",
        "amount": 3000000
    }
}

Callback

In the Crypto payment method, the payment platform returns the payout result in a callback. For the information about the callback structure, see Callbacks in Gate.

In this method, the payout currency data is sent in the callback using two codes: the standard cryptocurrency code and the internal Monetix code. For more information about the cryptocurrency codes, see Cryptocurrency codes.

The following is an example of a callback body with the information about a successfully completed payout.

Figure 18. Example of the data from a successful payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 3000000,
            "currency": "TRX"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 3000000,
            "currency": "A08"
        },
        "sum_converted": {
            "amount": 3000000,
            "currency": "A08"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined payout.

Figure 19. Example of the data from a declined payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "crypto",
        "sum": {
            "amount": 3000000,
            "currency": "TRX"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 3000000,
            "currency": "A08"
        },
        "sum_converted": {
            "amount": 3000000,
            "currency": "A08"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Analysis of payments results

As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.

You can load and analyze all the necessary information in Dashboard (dashboard.gtxpoint.com), for instance you can use the analytic panels in the Analytics section for this purpose.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by means of sending requests to the /operations/get endpoint.

If you have any further questions regarding payment data analysis, contact Monetix technical support.