REST API
USDT and USDC
Webhooks
Node.js and PHP

Pix to USDT API: receive via Pix and convert to USDT or USDC

Create the Pix charge with a purchase instruction. When the Pix is confirmed, the amount is converted to USDT or USDC and sent to your company wallet, with webhooks at each stage and official packages for Node.js and PHP.

Stage
Dynamic QR Code
Pix Pix
R$ 4,500.00
Awaiting payment ⬢ 04:58
Pix Copy and Paste
00020126580014BR.GOV.BCB.PIX0136a3f5e1c2-7b4d-4e8f-9c1a-5f6e8d3b2a4f5204000053039865406450.005802BR5919XGate PAGAMENTOS6011SAO PAULO62070503***6304A1B2

Pix to USDT API

Each Pix charge created with POST /deposit can carry the purchase object, with coin, network and destination wallet. After the Pix is confirmed, the purchase runs automatically with the amount received, and you track everything by webhook.

You send
  • POST /deposit
  • With purchase
Your company receives
  • USDT or USDC
  • In the company wallet

One call to charge via Pix and receive in digital dollars

API flow

From the Pix charge to on-chain delivery

The API uses REST and JSON, with JWT token authentication. The most direct flow creates the charge and the purchase in the same call: when the Pix is confirmed and credited in reais, the purchase runs at market price and the crypto goes to the company external wallet.

Step by step:

  1. 01 Log in and get the JWT token, valid for 15 days
  2. 02 Check assets, networks and limits with GET /crypto/options
  3. 03 Create the charge with POST /deposit and the purchase object
  4. 04 Your customer pays the Pix and the amount is credited in reais
  5. 05 Track by webhook until DELIVERED, with the on-chain hash
POST /deposit Illustrative example
R$ 349
Pix confirmed Reais in balance
R$ 349
Purchase BRL → USDT
At market
Delivery DELIVERED · Tron
69.10 USDT
Quote

Prefer to lock the price before buying?

If the company already has a BRL balance, POST /crypto/quotes guarantees the price for 30 seconds. Then POST /crypto/purchases runs the purchase with that quote. Requesting a quote and not using it costs nothing. The price already includes the commercial margin, and only the network fee is deducted on delivery.

Ways to buy:

  1. 01 In the charge: purchase object in POST /deposit, at market
  2. 02 From balance: POST /crypto/purchases, at market
  3. 03 With a quote: quoteId valid for 30 seconds
  4. 04 Just to show a value: POST /crypto/quotes/estimate
  5. 05 Idempotency with externalId, unique per company
JWT
REST + JSON
externalId
Webhooks
Coins and networks

USDT and USDC on the main networks

The API supports USDT on Tron, Ethereum, Polygon and Solana and USDC on Ethereum, Polygon and Solana. XGate does not offer custody: there is no crypto balance on the platform, and the crypto goes to the company external wallet, without memo or tag.

Purchase status:

  • EXECUTING: purchase in progress
  • PENDING_APPROVAL: under compliance review, when applicable
  • DELIVERED: crypto confirmed on the network, with txHash
  • REJECTED: the BRL amount returns to the balance
Webhooks purchase.*
Charge created

QR Code and Pix Copy and Paste

Pix confirmed

Reais credited to the balance

Crypto delivered

purchase.delivered event with txHash

Integration

Integrate with REST or the official packages

Use the REST API directly or the official packages for Node.js (NPM) and PHP (Composer), which handle login and calls. Before operating, register the allowed IP list and the webhook URL in the dashboard.

The purchase may go through compliance approval before delivery, depending on the account setup, and each company’s limits appear in GET /crypto/options.

Login JWT
Options GET
Charge POST
Pix confirmed Webhook
Purchase Purchase
Delivery txHash
Sample call

Example: Pix charge with a USDT purchase

This call creates the BRL charge and schedules the purchase for when the Pix is confirmed. Values are illustrative.

POST https://api.xgateglobal.com/deposit
Authorization: Bearer <token>

{
  "amount": 1500.00,
  "customerId": "<customer_id>",
  "currency": { "_id": "<currency_id>", "name": "BRL", "type": "PIX", "symbol": "R$" },
  "purchase": {
    "asset": "USDT",
    "network": "TRON",
    "address": "<company_wallet>"
  },
  "externalId": "pedido-7722"
}
Who it is for

For platforms that take Pix and want to receive in stablecoins

Businesses with a technical team and recurring volume that want to automate Pix to USDT or USDC conversion inside their own system.

E-commerce

Pix checkout and receiving in USDT or USDC.

SaaS

Charge subscriptions via Pix and receive in stablecoins.

Marketplaces

Combine the API with subaccounts and split between participants.

Fintechs

Add Pix and conversion to your product with the Pix API.

Importers

Automate USDT purchases for your operation abroad.

Large volumes

For larger operations, the OTC desk works with direct quotes.

Frequently asked questions

Is there an API to receive via Pix and convert to USDT?
Yes. With the XGate API, you create the Pix charge in POST /deposit with the purchase object. When the Pix is confirmed, the USDT or USDC purchase runs and the crypto goes to the company wallet.
USDT on Tron, Ethereum, Polygon and Solana, and USDC on Ethereum, Polygon and Solana.
Yes, when buying from a BRL balance: POST /crypto/quotes guarantees the price for 30 seconds. A purchase attached to a Pix charge runs at market price.
By webhooks or by querying the purchase. DELIVERED includes the transaction hash. On REJECTED, the BRL amount returns to the company balance.
No. XGate does not offer custody and there is no crypto balance on the platform. The crypto goes to the company external wallet.
The quoted price already includes the commercial margin, and the network fee is deducted on delivery. Terms vary by operation and are presented in the proposal.
Yes. There are official packages for Node.js (NPM) and PHP (Composer), plus the REST API with public documentation.

Ready to integrate Pix and USDT?

Talk to our team to open the account and enable crypto purchases for your company.