NON-CUSTODIAL BSC & opBNB CHECKOUT WITH 18-DECIMAL PRECISION
Accept crypto payments (USDT, USDC, BNB) on BSC and opBNB directly into your Gnosis Safe treasury. Zero custody, dynamic 18-decimal token normalization, and sub-second HMAC-SHA256 signed webhooks.

Atomic Split Router & Webhook Inspector
{
"event": "invoice.paid",
"invoiceId": "0x9f2c7a8841",
"token": "0x55d398326f99059fF775485246999027B3197955",
"decimals": 18,
"amountPaid": "2500000000000000000000",
"merchant": "0x3E8b4179...59D1",
"confirmations": 18,
"signature": "hmac_sha256_9c2a1e847..."
}RarePay Plans & Self-Hosted Setup
- ✓RarePayRouter.sol deployment on BSC & opBNB
- ✓Direct routing to your Gnosis Safe multisig
- ✓0% platform commission on future volume
- ✓Open-source TypeScript checkout widget
- ✓Self-hosted webhook listener scripts
- ✓Managed sub-second Ponder indexer infrastructure
- ✓HMAC-SHA256 signed webhook delivery with retries
- ✓Merchant analytics dashboard & email alerts
- ✓Pre-built Shopify & WooCommerce checkout plugins
- ✓Multi-currency price feed conversion (Chainlink)
- ✓Deterministic CREATE2 counterfactual deposit clones
- ✓Automated multi-token sweepers (zero gas trapped)
- ✓Custom ERP & accounting database synchronization
- ✓Dedicated high-throughput BSC/opBNB RPC cluster
- ✓Formal security hardening & priority SLA
On-Chain Decimals & Safe Routing Logic
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
contract RarePayRouter {
using SafeERC20 for IERC20;
event InvoicePaid(bytes32 indexed invoiceId, address indexed token, uint256 amount);
function payTokenInvoice(
bytes32 invoiceId,
address token,
uint256 amount,
address merchantSafe
) external {
// Enforce dynamic decimals check (never assume 6 or 18 decimals)
uint8 dec = IERC20Metadata(token).decimals();
require(dec >= 6 && dec <= 18, "UnsupportedDecimals()");
uint256 fee = (amount * 50) / 10000; // 0.5% fee
uint256 merchantNet = amount - fee;
// Atomic Check-Effects-Interactions (CEI) transfer
IERC20(token).safeTransferFrom(msg.sender, merchantSafe, merchantNet);
IERC20(token).safeTransferFrom(msg.sender, feeCollector, fee);
emit InvoicePaid(invoiceId, token, amount);
}
}Why do Ethereum/Arbitrum checkout plugins break on BSC USDT and USDC?
On Ethereum, Arbitrum, and Base, USDT and USDC use 6 decimals. On Binance Smart Chain (BSC), Binance-Peg USDT (0x55d398...) and Binance-Peg USDC (0x8AC76a...) both use 18 decimals! Hardcoding 6 decimals causes payments to be off by a catastrophic factor of 10^12. RarePay dynamically calls IERC20Metadata(token).decimals() on-chain, guaranteeing precision.
Does Rareware ever hold or custody merchant revenues?
Never. RarePayRouter.sol is strictly non-custodial. When a customer executes payTokenInvoice(), the smart contract atomically routes 99.5% directly to your merchant Gnosis Safe treasury and 0.5% to the fee receiver in the exact same transaction. Funds never touch a Rareware custodial wallet.
How does RarePay verify transaction finality on BSC?
Following the 2025–2026 Maxwell hardfork, BSC produces blocks in 450ms with fast finality around 650ms. RarePay’s Ponder indexer listens for the on-chain InvoicePaid event and confirms delivery after 15–20 blocks (~7–9 seconds) to exceed finality before dispatching the signed HMAC-SHA256 webhook.
What happens if a customer sends the wrong token or insufficient amount?
RarePayRouter verifies the transferred token address against an allowlist and checks that msg.value or tokenAmount matches the invoice requirement. If insufficient funds are transferred, the transaction reverts atomically—preventing partial unrecorded balances.
Can RarePay invoices be settled in BNB as well as stablecoins?
Yes. RarePay supports native BNB payments (via payNativeInvoice) alongside all standard ERC-20 tokens (USDT, USDC, DAI) with full 18-decimal precision.
