Skip to content

Integration Guide ​

This section covers advanced integration topics to help you build a robust payment system with BITXpay.

Topics ​

Webhooks ​

Learn how to receive real-time payment notifications and handle payment status updates.

Environments ​

Understand the difference between sandbox and production environments.

Integration Architecture ​

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Your App      │────▶│   BITXpay API   │────▶│   Blockchain    │
└─────────────────┘     └─────────────────┘     └─────────────────┘
        ▲                       │
        │                       │
        │    Webhook (POST)     │
        └───────────────────────┘

Best Practices ​

  1. Always verify webhooks - Validate the HMAC signature on every webhook
  2. Apply updates idempotently - Deduplicate by business resource and transition; webhook delivery IDs change on retries
  3. Handle timeouts gracefully - Cryptocurrency transactions can take time
  4. Log everything - Keep detailed logs for debugging and auditing
  5. Test in sandbox first - Always test your integration before going live