Quick Start Guide

Last updated: 2026-10-21

This guide gets you from credentials to a working DCE API integration quickly.

Prerequisites

  • Access to the DCE merchant dashboard — you generate your own API key and, if you use webhooks, your signing secret under Account → Integration
  • A backend service where secrets can be stored securely
  • HTTPS endpoint for webhook testing (ngrok is fine for local dev)
  • Basic familiarity with JSON + HTTP APIs

1) Choose environment

EnvironmentBase URL
Productionhttps://api.dcepay.io
Staginghttps://api.dcepay.dev

All endpoints are under /api.

Supported assets: balances and money movement are per (currency, network) pair. USDT on TRX is what is available today (use TRX_NILE on staging); USDT/USDC on ETH, BNB, and SOL are coming soon and can be enabled on request.

Staging uses testnets. The examples below use network=TRX (production). On https://api.dcepay.dev send TRX_NILE instead — the TRON Nile testnet. Fund sandbox deposit addresses with Nile test USDT (contract TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf) from the Nile faucet and follow transactions on nile.tronscan.org. The former testnet symbol TRX_SHASTA is still accepted and treated as TRX_NILE. See the Testing Guide.

2) Configure environment variables

DCE_BASE_URL=https://api.dcepay.dev
DCE_API_KEY=your_api_key

3) Make your first authenticated request

Use your API key in Authorization as either:

  • raw key (Authorization: <key>), or
  • bearer format (Authorization: Bearer <key>)
curl -sS "${DCE_BASE_URL}/api/balance?currency=USDT&network=TRX" \
  -H "Authorization: ${DCE_API_KEY}" \
  -H "Content-Type: application/json"

Expected response shape:

{
  "currency": "USDT",
  "network": "TRX",
  "available": "0",
  "pending": "0"
}

Balances are per (currency, network) pair — call GET /api/balance without parameters to list every balance row your account holds.

4) Create a deposit address

curl -sS -X POST "${DCE_BASE_URL}/api/deposit-address" \
  -H "Authorization: ${DCE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "network": "TRX",
    "identifier": "customer_123",
    "referenceId": "order_1001"
  }'

The response includes the generated address and metadata you can store for the customer/order.

5) Optional: create a hosted deposit URL

curl -sS -X POST "${DCE_BASE_URL}/api/deposit-url" \
  -H "Authorization: ${DCE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "network": "TRX",
    "identifier": "customer_123",
    "referenceId": "order_1001"
  }'

6) Create a withdrawal

Withdrawals require a network and draw only from that chain's balance. Include a unique referenceId for idempotency — reusing one never creates a second payout (the duplicate returns 409).

curl -sS -X POST "${DCE_BASE_URL}/api/withdrawals" \
  -H "Authorization: ${DCE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "50.00",
    "currency": "USDT",
    "network": "TRX",
    "destination": "TDestinationAddress...",
    "referenceId": "payout_1001"
  }'

7) Enable webhooks

In the dashboard (Account → Integration → Webhook) save your webhookUrl, then press Generate signing secret and copy the whsec_… value — it is shown once.

DCE sends outbound POSTs with:

  • Content-Type: application/json
  • X-Webhook-Event
  • X-Webhook-Signature (hex HMAC-SHA256 of raw body with your webhook secret)

Use idempotency on your side and acknowledge successful processing with HTTP 2xx.

8) Validate and go live

Before production:

  • Test deposits, withdrawals, and webhook delivery in staging
  • Confirm retry handling on webhook failures/timeouts
  • Verify monitoring for 401, 403, 429, and 5xx patterns
  • Decide your screening policy: which payout destinations and deposit senders you check with AML Address Checks or TRON Address Compliance Checks before money moves

Useful links


Need implementation help or a review of your integration sequence? Contact [email protected].


Did this page help you?