Skip to main content

Frequently Asked Questions

Where do integration tests take place?

All integration tests are performed directly in our Production environment.

What are the minimum values for deposits and withdrawals?

To ensure successful transactions, observe the minimum required limits, which vary depending on the channel used:

💻 Operations via API

  • Fiat Deposits and Withdrawals (BRL): R$ 0,20
  • Deposits with conversion (BRL ➔ USDT/USDC): R$ 0,20
  • Withdrawals with conversion (USDT/USDC ➔ BRL): 0.1 USDT/USDC
  • Crypto ➔ Crypto Withdrawals (Network Minimum):
    • Solana: 1 USDT/USDC
    • Tron: 10 USDT
    • Polygon: 10 USDT/USDC
    • Ethereum (ERC-20): 50 USDT/USDC

📊 Operations via Dashboard

  • Fiat Withdrawals (BRL ➔ BRL): R$ 0,20
  • Withdrawals with conversion (BRL ➔ USDT/USDC): R$ 250,00 (regardless of network)
  • Crypto ➔ Crypto Withdrawals: Follow the same minimum limits required by the networks in the API.

👉 Important Note: XGate does not support direct conversions between cryptocurrencies (e.g., USDT to USDC or vice versa), either through the API or the Dashboard.

How to make a fiat currency deposit?

STEP 1Authentication

Log in to get your access token. This token must be sent in the Header of all subsequent requests.

Authorization: Bearer eyJhbGci...

STEP 2Create or Identify the Customer

Send the payer's data to the route [POST] /customer. If the customer already exists, the API will return the record with the current ID.

{
"name": "João Silva",
"phone": "5511999999999",
"email": "joao@email.com",
"document": "12345678909"
}

STEP 3Select Fiat Currency

Check the currencies available for your account at [GET] /deposit/company/currencies and use the returned object.

[
{
"_id": "6728f0******************",
"name": "BRL",
"type": "PIX",
"symbol": "R$"
}
]

STEP 4Generate Deposit Request

Send the amount, customer ID and currency object to [POST] /deposit to receive the Pix QR Code.

{
"amount": 10,
"customerId": "675792************",
"currency": {
"_id": "67acba38************",
"name": "BRL",
"type": "PIX"
}
}

👉 For field details and errors, see the page Create Pix Deposit.

How to make a fiat currency withdrawal?

STEP 1Authentication

Log in to get your access token. It is mandatory in the Header to generate the withdrawal.

STEP 2Search for Withdrawal Currencies

Check the currencies enabled for your account via the route [GET] /withdraw/company/currencies.

STEP 3Create the withdrawal request

Send the data to the route [POST] /withdraw providing the amount, customerId, currency data and Pix key in the object

{
"amount": 1,
"customerId": "67594a***************",
"currency": {
"_id": "67339fa***************",
"name": "BRL",
"type": "PIX"
},
"pixKey": {
"key": "02*********",
"type": "CPF"
}
}

👉 For field details and errors, see the page Create Pix Withdrawal.

How to make a cryptocurrency deposit?

STEP 1Customer Creation

Register the end user at [POST] /customer to get your unique identifier.

STEP 2Get Wallet PublicKey

Request the public keys (wallets) linked to the customer at [GET] /crypto/customer/CLIENT_ID/wallet.

👉 For field details and errors, see the page Create Crypto Deposit.

How to make a withdrawal of cryptocurrency?

This flow allows you to send cryptocurrencies from your XGate balance directly to an external wallet (e.g., Metamask, Ledger, or Exchange).

STEP 1Create or Identify the Customer

Make sure the receiving customer is registered at the route [POST] /customer to get the customerId.

{
"name": "Client Name",
"document": "12345678909"
}

STEP 2Get Available Networks and Cryptocurrencies

Check the blockchain networks enabled for withdrawal at [GET] /withdraw/company/blockchain-networks.

[
{
"_id": "69ea849098**************",
"chain": "Solana",
"name": "Solana",
"symbol": "SOL"
},
]

And fetch the desired cryptocurrency data at the route [GET] /withdraw/company/cryptocurrencies.

[
{
"_id": "6733a2****************",
"name": "USDT",
"symbol": "USDT",
"coinGecko": "tether",
"updatedDate": "202*********************",
"createdDate": "202*********************",
"__v": 0
}
]

STEP 3Create the withdrawal request

Send the payload to [POST] /withdraw. Note that the wallet destination is provided at the end of the object, after the network definitions.

{
"amount": 2,
"customerId": "673238****************",
"cryptocurrency": {
"_id": "6793f5****************",
"name": "USDT",
"symbol": "USDT"
},
"blockchainNetwork": {
"_id": "69ea849098**************",
"chain": "Solana",
"name": "Solana",
"symbol": "SOL"
},
"wallet": "0x742d35******************************"
}

The response will confirm the status as PENDING.

👉 For field details and errors, see the page Create External Withdrawal.

How to make a deposit with fiat currency and convert to cryptocurrency?

This flow is ideal for gateways that want to receive Pix payments (BRL) and have the balance automatically credited in Cryptocurrencies (ex: USDT) in your XGate account.

STEP 1Authentication and Customer

Make sure you are authenticated and have the customerId of the payer generated at the route [POST] /customer.

STEP 2Get Fiat Currency (Origin)

Check the currency that the customer will use to pay at [GET] /deposit/company/currencies and save the object (ex: BRL/PIX).

{
"_id": "6728f0******************",
"name": "BRL",
"symbol": "R$",
"type": "PIX"
}

STEP 3Get Cryptocurrency (Destination)

Check the cryptocurrency you want to receive at [GET] /deposit/company/cryptocurrencies and save the object (ex: USDT).

{
"_id": "67339b******************",
"name": "USDT",
"symbol": "USDT",
"coinGecko": "tether"
}

STEP 4Create the deposit and conversion request

Send the amount, customer ID and both currency objects to the route [POST] /deposit.

{
"amount": 100,
"customerId": "677e15******************",
"currency": {
"_id": "6728f0******************",
"name": "BRL",
"type": "PIX"
},
"cryptocurrency": {
"_id": "67339b******************",
"name": "USDT",
"symbol": "USDT"
}
}

Response: The API will return the status WAITING_PAYMENT and the code Pix code for the customer to pay. As soon as it's cleared, the conversion to Crypto is instantaneous.

👉 For field details and errors, see the page Create Deposit converting to Crypto.

How to make a withdrawal with cryptocurrency and convert to fiat currency?

This flow allows you to use your balance in Cryptocurrencies (ex: USDT) to make a payment via Pix (BRL) to a customer, with automatic exchange rate conversion.

STEP 1Identify the Customer and Create Pix Key

Make sure you have the customerId and register the destination Pix key for this customer at the route [POST] /pix/customer/ID_CLIENTE/key.

{
"key": "12345678909",
"type": "CPF"
}

⚠️ IMPORTANT: The return of this route will provide the _id of the Pix key, required for the final step.

STEP 2Simulate the Conversion (Optional)

To find out the exact amount in BRL before finalizing the withdrawal, send the complete cryptocurrency object to [POST] /withdraw/conversion/brl/pix.

{
"amount": 10,
"cryptocurrency": {
"_id": "6733a2******************",
"name": "USDT",
"symbol": "USDT",
"coinGecko": "tether",
"updatedDate": "202*********************",
"createdDate": "202*********************",
"__v": 0
}
}

Server Response:

{
"amount": 51.72,
"currency": "R$",
"cryptoToFiatExchangeRate": "R$ 5.172"
}

STEP 3Create the withdrawal request with conversion

Send the payload to [POST] /withdraw including mandatory _id of each resource retrieved in the previous steps.

{
"amount": 10,
"customerId": "68e7b8******************",
"currency": {
"_id": "6728f0******************",
"name": "BRL",
"type": "PIX"
},
"cryptocurrency": {
"_id": "6733a2******************",
"name": "USDT",
"symbol": "USDT"
},
"pixKey": {
"_id": "692c81******************",
"key": "12345678909",
"type": "CPF"
}
}

XGate will charge 10 USDT from your balance and send R$ 51.72 via Pix to the key provided.

👉 For field details and errors, see the page Create Crypto Withdrawal converting to FIAT.

How to create a partner in the admin panel?

If you prefer not to use the API to create sub-accounts, you can perform the process manually through the XGate Backoffice.

STEP 1Access the Partners Menu

In the left sidebar of your panel, locate and click on the option Partners.

STEP 2Access the List

Within the section, click on the button View partners list located at the top of the page.

STEP 3Start Registration

On the list screen, click the blue button + Register partner.

STEP 4Configuration and Saving

A form will be displayed. Fill in all the data of the new company (Sub-account) and especially the fee rules (Fees) that you want to apply. When finished, click the button Save at the end of the form.

✅ Result: The partner will receive credentials from your email and you will be able to track the volume transacted by them in real time.

👉 Learn how to automate this at Create Sub-account.

What are the HTTP status codes returned by the API?

The XGate API follows REST standards and returns conventional HTTP status codes to indicate the success or failure of a request. Below are the main codes you will encounter:

  • 200 OK: A requisição foi recebida, processada e retornou com sucesso.
  • 201 Created: Sucesso! O recurso (ex: um novo cliente, depósito ou saque) foi criado no servidor.
  • 400 Bad Request: Erro de validação. O corpo da sua requisição está mal formatado ou faltando campos obrigatórios.
  • 401 Unauthorized: Falha de Autenticação. O seu Token Bearer não foi enviado no Header, está expirado ou é inválido.
  • 403 Forbidden: Sem permissão. Você está autenticado, mas a sua conta não tem privilégios para executar esta ação específica.
  • 404 Not Found: O recurso que você tentou acessar ou buscar (ex: um ID de transação específico) não existe.
  • 500 Internal Server Error: Falha interna no servidor da XGate. Caso isso ocorra, o problema é do nosso lado.

💡 Debugging tip: Whenever the API returns an error (400 or 500 series), the response body will contain a JSON object with the property message detailing exactly what caused the failure.