OxaPay

Add crypto payment processing to Convex apps with Bitcoin, Ethereum, USDT support, hosted invoices, and real-time status updates.

Installation

npm install convex-oxapay

About OxaPay

A Convex Component that integrates OxaPay's crypto payment gateway for accepting Bitcoin, Ethereum, USDT, USDC, and other cryptocurrencies. It provides hosted invoices, white-label payments, static deposit addresses, and payouts with automatic status mirroring to your Convex database. The component includes webhook handling with HMAC verification and React hooks for live payment status updates.

Benefits

Use cases

how to accept bitcoin payments in Convex app

The convex-oxapay component provides createInvoice() and createWhiteLabel() functions that generate crypto payment addresses for Bitcoin and 30+ other cryptocurrencies. Payment status automatically syncs to your Convex database via webhooks, so you can query the latest status with useQuery() without API calls.

crypto payment gateway with real-time status updates

OxaPay component mirrors all payment data to Convex tables and handles webhook verification automatically. Your React components get instant status updates through Convex's live queries whenever payments transition from waiting to paid or expired.

accept recurring crypto payments subscription

Use the staticAddresses API to generate permanent wallet addresses for each user. Customers can send crypto to these addresses repeatedly for subscriptions or wallet top-ups, with automatic detection and processing.

send crypto payouts from Convex backend

The payouts API lets you send crypto payments to users with status tracking. All payout statuses are mirrored to your Convex database so you can build payout dashboards and handle confirmations through webhook events.

Frequently asked questions

What cryptocurrencies does the OxaPay component support?

The convex-oxapay component supports Bitcoin, Ethereum, USDT, USDC, and dozens of other cryptocurrencies across multiple blockchain networks. It accepts both fiat-priced invoices (USD, EUR) and crypto-native amounts.

How does webhook verification work with OxaPay?

The convex-oxapay component automatically handles HMAC-SHA512 webhook verification using your API key as the secret. It performs idempotent deduplication and only processes forward status transitions, so duplicate or out-of-order webhooks are safely ignored.

Can I build custom checkout UI instead of hosted pages?

Yes, the convex-oxapay component provides createWhiteLabel() for fully custom checkout experiences. This returns the crypto address, exact payment amount, and QR code data so you can build your own payment interface while still getting automatic status updates.

How do I test payments before going live?

The convex-oxapay component supports OxaPay's sandbox mode by setting OXAPAY_SANDBOX=true in your environment variables. This sends sandbox:true on all payment creation calls for testing without real cryptocurrency transactions.

What Convex functions do I need to handle payments?

The convex-oxapay component works through Convex actions for creating payments (since they call external APIs) and queries for reading payment status from the mirrored tables. Webhook handling runs automatically through HTTP routes you register in convex/http.ts.

Links