Bag is live — accept USDC & card payments globally. Get started →
BagBag Docs
Finance

Testing Payments & Taxes

Use the sandbox environment to test payments and tax calculations.

Testing Payments & Taxes

Bag provides a full sandbox environment for testing payments, tax calculations, and payout flows before going live.


Sandbox Environment

The sandbox uses test networks and never moves real funds. Use sandbox API keys (bag_test_sk_*) to access it.

FeatureSandbox Behavior
Stablecoin paymentsTestnet USDC on Base Sepolia and Solana Devnet
Tax calculationReal tax engine with test data
WebhooksDelivered with "livemode": false
SettlementsSimulated payout flows
DashboardSeparate test mode toggle

Getting Testnet Funds

To test stablecoin payments, you need testnet USDC:


Testing Tax Calculations

The sandbox connects to the same tax engine (Numeral) used in production. You can test:

  • Tax quotes for different customer jurisdictions
  • Tax-inclusive vs. tax-exclusive pricing
  • B2B exemptions with test VAT IDs
  • Cross-border tax scenarios

Use the POST /api/tax/quote endpoint with sandbox keys to get tax breakdowns before checkout.


Testing Webhooks

Sandbox webhooks behave identically to production, with one difference: all payloads include "livemode": false. Use a tool like ngrok to expose your local server for webhook testing.


What's next

For a complete end-to-end testing walkthrough, see the Test Payments End-to-End guide.

On this page