Sandbox Server

The ICPay sandbox server provides a testing environment where new features are introduced first, allowing developers to test integrations before they're available in production.

Overview

The sandbox server is available at:

demo.betterstripe.com and pos.betterstripe.com are linked to the sandbox environment and use the same test networks and sandbox API.

Important Notes

  • Sandbox Environment: This is a testing environment and may be unavailable at times due to feature rollouts, updates, or maintenance.
  • New Features First: New features and updates are typically deployed to the sandbox before production, making it ideal for early testing and integration.
  • Test Networks: The sandbox includes mainnets but also testnet and devnet networks (Base Sepolia, SKALE Base Testnet, ARC Network Testnet, and Solana Devnet) so you can test with free faucet tokens without spending real funds.
  • Separate from production: Users and accounts created in the sandbox (betterstripe.com, demo.betterstripe.com, pos.betterstripe.com) are not the same as users and accounts on live production icpay.org. You must create separate accounts for sandbox testing and for production use.

Test Networks

The sandbox server supports the following test networks for development and testing:

Chain NameChain IDRPC URLFaucet Link
Base Sepolia84532https://sepolia.base.orgChainlink Faucet / ETHGlobal Faucet
SKALE on Base Testnet (SKALE on Base Sepolia)324705682https://base-sepolia-testnet.skalenodes.com/v1/jubilant-horrible-anchaSKALE Base Sepolia Faucet
ARC Network Testnet5042002https://rpc.testnet.arc.networkARC Faucet / Circle Faucet
Solana Devnet-https://api.devnet.solana.comSolana Faucet / QuickNode Faucet

Getting Test Tokens

All test networks provide free test tokens through their respective faucets:

These test tokens have no real-world value and are intended solely for development and testing purposes.

Wallet setup for Solana Devnet

To test Solana payments on the sandbox with devnet tokens, use a Solana wallet in developer/testnet mode. Below is how to configure Phantom and Backpack.

Phantom

  1. Open Phantom and go to Settings (gear icon).
  2. Open Developer Settings (or Security & PrivacyDeveloper Settings in some versions).
  3. Turn on Developer Mode (or Testnet Mode) so you can switch the wallet to Solana Devnet.
  4. In the network selector, choose Devnet so the wallet uses Solana Devnet and your devnet SOL/tokens.

Backpack

  1. Open Backpack and go to Settings.

  2. Enable Developer Mode so you can use test networks and custom RPCs.

  3. To test with devnet tokens, set the Solana RPC to the devnet endpoint:

    • Go to SettingsNetworks (or Developer / RPC).
    • Set the Solana RPC URL to: https://api.devnet.solana.com

    Without this RPC setting, Backpack may use mainnet by default and devnet transactions (e.g. from the Solana Faucet) will not appear or work correctly.

After configuring your wallet, request test SOL from the Solana Faucet or QuickNode Faucet and use the sandbox (betterstripe.com) to complete devnet payments.

Using with Widget

To use the ICPay Widget with the sandbox server, configure the apiUrl option in your widget config to point to the sandbox API endpoint.

Widget examples with sandbox

'use client'
import { useEffect, useRef } from 'react'
import '@ic-pay/icpay-widget'

export default function Page() {
  const ref = useRef<any>(null)
  useEffect(() => {
    if (!ref.current) return
    ref.current.config = {
      publishableKey: process.env.NEXT_PUBLIC_ICPAY_PK,
      apiUrl: 'https://api.betterstripe.com', // Sandbox API endpoint
      amountsUsd: [1, 5, 10],
      defaultAmountUsd: 5,
    }
    const onDone = (e: any) => console.log('Tip completed', e.detail)
    window.addEventListener('icpay-sdk-transaction-completed', onDone)
    return () => window.removeEventListener('icpay-sdk-transaction-completed', onDone)
  }, [])
  return <icpay-tip-jar ref={ref as any} />
}

Note: Make sure you're using a publishable key from your sandbox account at betterstripe.com. The sandbox uses test networks (Base Sepolia, SKALE Base Testnet, ARC Network Testnet, and Solana Devnet), so you'll need test tokens from the faucets listed above to complete transactions.

Was this page helpful?