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
dataobject is serialized as compact JSON (no spaces, no newlines).JSON.stringify(obj)in JavaScript produces the correct format by default. -
Data content — The
signis computed over only thedatafield, not the full request envelope. Thesign,timestamp, andnoncefields are excluded. -
Token mismatch — Confirm the
MERCHANT_TOKENused 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?
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-urlin 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-userto 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
datafield only, not the fullNotifyPayload. - Webhook secret mismatch: Confirm the
webhook-secretused for verification matches what is configured in the gateway. - JSON format: The
datafield must be serialized as compact JSON for verification.
Deployment Issues
Why are Docker containers not starting?
- Port
180already in use - Insufficient disk space
- Missing environment variables in configuration
Why is the gateway not responding?
- Verify container is running:
docker compose psshould showUpstatus. - 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 receive429 Too Many Requests:
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.
- Gateway version and deployment method
- Relevant configuration (redact secrets)
- Complete error messages and logs
- Steps to reproduce

