Diagnose and resolve common problems with your XPayLabs gateway deployment and API integration. This guide covers HMAC signature errors, blockchain scanner issues, webhook delivery failures, and Docker deployment problems.
API Issues
Why am I getting 401 sign verification failed?
The HMAC-SHA256 signature does not match what the gateway computed.
Checklist:
-
JSON serialization — Ensure the
data object is serialized as compact JSON (no spaces, no newlines). JSON.stringify(obj) in JavaScript produces the correct format by default.
-
Data content — The
sign is computed over only the data field, not the full request envelope. The sign, timestamp, and nonce fields are excluded.
-
Token mismatch — Confirm the
MERCHANT_TOKEN used to compute the signature matches the token configured in the gateway.
-
Character encoding — Ensure the token and JSON string are UTF-8 encoded.
-
Test your signature — Compute the signature for a known payload and compare:
Why am I getting 400 validation errors?
| Message | Likely Cause |
|---|
"The amount cannot be left blank." | amount is null, undefined, or not a valid number |
"The symbol cannot be left blank." | symbol is missing or an empty string |
"The chain cannot be left blank." | chain is missing or not a valid chain value |
"ReceiveAddress error" | The payout address format does not match the specified chain |
"The uid cannot be left blank." | Your merchant account is V2 and requires uid |
"The orderId cannot be left blank." | Your merchant account is V3 and requires orderId |
Blockchain Scanner Issues
Why are blockchain payments not detected?
If the scanner is not detecting incoming payments:
- Check scanner logs:
docker logs <scanner-container-name>
- Verify RPC endpoints: Ensure the configured RPC URL is accessible from the gateway server.
- Check block height: The scanner syncs from the last processed block. If the gateway was recently deployed, it may need time to catch up.
- Confirm token configuration: Verify the token contract address is correctly configured for the chain.
- Check blockchain explorer: Confirm the transaction actually exists on-chain at the expected address.
Why is the scanner slow?
- RPC rate limits: Public RPC endpoints may throttle high-frequency requests. Consider using dedicated RPC endpoints.
- Block time: Different chains have different block times. TRON produces blocks every 3 seconds, Ethereum every 12 seconds.
- Confirmation requirements: Configure the required number of block confirmations per chain in the gateway settings.
Webhook Problems
Why am I not receiving webhooks?
- Verify callback URL: Check the
callback-url in your gateway configuration.
- Network accessibility: The gateway must be able to reach your callback URL. If testing locally, use a tunneling tool like ngrok.
- Check gateway logs:
docker compose logs xpay-user to see webhook delivery attempts.
- Check your endpoint logs: Ensure your server is listening on the correct path and returning HTTP 200.
Why is webhook signature verification failing?
- Raw data vs. full payload: Verify the signature over the
data field only, not the full NotifyPayload.
- Webhook secret mismatch: Confirm the
webhook-secret used for verification matches what is configured in the gateway.
- JSON format: The
data field must be serialized as compact JSON for verification.
Deployment Issues
Why are Docker containers not starting?
Common causes:
- Port
180 already in use
- Insufficient disk space
- Missing environment variables in configuration
Why is the gateway not responding?
- Verify container is running:
docker compose ps should show Up status.
- Check port binding:
docker compose port gateway 180
- Test locally:
curl http://localhost:180/v1/symbol/supportSymbols
- Check firewall: Ensure port 180 is open in your server firewall.
Rate Limiting
If you receive 429 Too Many Requests:
| Endpoint | Default Limit |
|---|
POST /order/createCollection | 100 req / 10s per IP |
POST /order/createPayout | 100 req / 10s per IP |
GET /order/pay | 2 req / 1s per orderId |
GET /order/getOrderStatus | 2 req / 1s per orderId |
Implement exponential backoff in your integration:
Getting Help
If you cannot resolve your issue:
- Check the container logs for error messages.
- Review the FAQ for common questions.
- Open a GitHub issue at github.com/xpaylabs/gateway.
- For commercial support, contact support@xpaylabs.com.
When reporting an issue, include:
- Gateway version and deployment method
- Relevant configuration (redact secrets)
- Complete error messages and logs
- Steps to reproduce
Last modified on June 26, 2026