Make Your First Test Payment
Create a test invoice in sandbox, send testnet USDT, and verify the webhook.
Make Your First Test Payment
Create a test invoice, pay it with testnet USDT, and verify the webhook.
Prerequisites
- Sandbox account at
https://sandbox.3pa-y.com/ - Sandbox API key (from Settings > API Keys)
- Testnet USDT + gas tokens (Sepolia ETH or Nile TRX)
Step 1: Create a Test Invoice
const response = await axios.post(
"https://sandbox-api-url/api/v1/transaction/create",
{ email: "[email protected]", firstName: "Test", lastName: "User" },
{
params: { currencyType: "USDT-TRC20", amount: 5, timer: 30 },
headers: { apikey: "your-sandbox-api-key" }
}
);
console.log("Payment URL:", response.data.url);
console.log("Transaction ID:", response.data.transactionId);Step 2: Send Testnet USDT
- Open the payment URL
- Send at least 5 USDT to the displayed address on the correct testnet
- Page polls every 5 seconds and updates on confirmation
Step 3: Receive & Verify Webhook
Your webhook endpoint receives a POST with the transaction details. Verify the X-Webhook-Signature header using your webhook secret.
Get your secret:
POST /api/v1/webhook/secret/rotate(shown once) Verification code examples: Webhook Handling
Step 4: Verify via API (Optional)
const status = await axios.get(
"https://sandbox-api-url/api/v1/public/transaction/verify",
{
params: { transactionId: "your-transaction-id", type: "deposit" },
headers: { apikey: "your-sandbox-api-key" }
}
);
// "confirmed", "initiated", or "failed"Checklist
- Payment page shows "Confirmed"
- Webhook received with
status: "confirmed" - Webhook HMAC signature validates
-
GET /transaction/verifyreturnsconfirmed
Troubleshooting
| Issue | Solution |
|---|---|
| Payment not detected | Confirm correct testnet (Nile / Sepolia) |
| Invoice expired | Create new invoice with longer timer |
| Webhook not received | Set URL in Dashboard > Settings > Webhooks |
| Signature mismatch | Rotate secret, update verification code |
Next
- Testing & Sandbox — test wallets, withdrawals, rate limits
- Webhook Handling — full webhook guide
- Go Live Checklist — production readiness
Updated 26 days ago
