USDT on Polygon → BRL via PIXOff-ramp
Hover a node to see what happens inside the flow — drag to rearrange, scroll to zoom.
Code· 7 steps
One-time setup
1Create a sub-account
Segregated account for your end-user — returns subAccountId.
curl -X POST https://api.hodle.com.br/api/subaccount \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "Sam Chen" }'
2Verify the holder
Upload documents first via /api/kyc/document. Wait for the KYC_APPROVED webhook.
curl -X POST https://api.hodle.com.br/api/kyc \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "subAccountId": "$SUBACCOUNT_ID", "fullName": "Sam Chen", "dateOfBirth": "1993-04-12", "countryOfTaxId": "BRA", "taxIdNumber": "12345678901", ... }'
3Provision the wallet
curl -X POST https://api.hodle.com.br/api/wallet/create \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "subAccountId": "$SUBACCOUNT_ID", "network": "polygon" }'
4Fetch the wallet keys
Returns the protectedSymmetricKey blob used to sign transfers with the wallet PIN.
curl -X POST https://api.hodle.com.br/api/wallet/keys \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "subAccountId": "$SUBACCOUNT_ID" }'
Every transaction
5Lock a quote
Locks the rate — returns quoteToken, outputAmount and the fee breakdown.
curl -X POST https://api.hodle.com.br/api/quote \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "inputCurrency": "USDT", "inputPaymentMethod": "POLYGON", "outputCurrency": "BRL", "outputPaymentMethod": "PIX", "inputAmount": "100.00" }'
6Trigger the payout
Debits the wallet, converts and fires the PIX. externalId makes retries idempotent.
curl -X POST https://api.hodle.com.br/api/wallet/payout \
  -H 'Authorization: Bearer $HODLE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "subAccountId": "$SUBACCOUNT_ID", "value": 10000, "network": "polygon", "asset": "USDT", "pixKey": "[email protected]", "pixKeyType": "EMAIL", "walletPin": "$PIN", "protectedSymmetricKey": "$PSK", "externalId": "payout-123" }'
7Track the status
Poll until COMPLETED — or rely on PAYOUT_SUCCESSFUL / PAYOUT_FAILED webhooks.
curl -X GET https://api.hodle.com.br/api/wallet/payout/$TRANSACTION_ID \
  -H 'Authorization: Bearer $HODLE_API_KEY'