WordPress (WooCommerce)
The WooCommerce gateway uses bnbpay-api to create invoices and confirm stablecoin payments.
Flow overview
- Customer selects BNBPay (Stablecoins) at checkout.
- Plugin calls
POST /invoicesto create an invoice. - Customer pays using Permit2/EIP-2612/EIP-3009 via
/payments/build-intent+/relay/payment. - Plugin listens to
GET /invoices/:invoiceId/stream-sseand updates WooCommerce order status.
Notes:
- EIP-3009 authorizations use an intent-derived
authNonce; custom clients should derive it from the intent hash + router + chainId.
Required settings
- BNBPay API base URL
- Relay API key (if relay auth enforced)
- Stablecoin allowlist per network
Stablecoin enforcement
- Reject native BNB (
0x000...000). - Allowlist stablecoins per network (USDT/USDC/USD1/WUSD/XUSD as configured).
Admin tools
- Create invoice from an order if not already linked.
- View invoice status + transaction hash.
- Update order status when paid, expired, or cancelled.
Endpoints used
POST /invoicesGET /invoices/:invoiceIdGET /invoices/:invoiceId/statusGET /invoices/:invoiceId/stream-ssePOST /payments/build-intentPOST /relay/paymentGET /networks