Testing
Use testnets
Glide supports testnets alongside mainnets. Testnet chains are exported from @paywithglide/glide-js/chains just like mainnets — configure them the same way:
import { createGlideConfig } from "@paywithglide/glide-js";
import { baseSepolia, ethereumSepolia } from "@paywithglide/glide-js/chains";
export const config = createGlideConfig({
projectId: "your-project-id",
chains: [baseSepolia, ethereumSepolia],
});Sessions created against testnet chains behave exactly like mainnet sessions — same statuses, same payment actions, same webhooks — but use testnet funds from a faucet.
To discover available testnets programmatically, pass all: true to listSupportedChains and filter on isTestnet:
import { listSupportedChains } from "@paywithglide/glide-js";
const chains = await listSupportedChains(config, { all: true });
const testnets = chains.filter((chain) => chain.isTestnet);The same flag exists on listSupportedCurrencies for testnet tokens. See Supported chains & tokens for the full list, including virtual testnets.
Dry mode
createPaymentSession accepts a dryMode flag that creates the session for testing without processing a real payment — useful for exercising your session-handling code end to end:
const session = await createPaymentSession(config, {
paymentCurrency: usdc.on(base),
settleCurrency: usdc.on(polygon),
recipientWallet: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
paymentAmount: "100",
dryMode: true,
});Testing cheaply on mainnet
For an end-to-end test of the real thing, small amounts on low-fee chains (like Base) keep the cost of a full payment-to-settlement round trip to a few cents. The quickstart script is a good harness: run it with a small paymentAmount, pay the deposit address from any wallet, and watch the statuses progress.
Testing webhooks
Run your webhook endpoint locally by exposing it with a tunnel (e.g., ngrok or cloudflared) and pointing a webhook at the tunnel URL in the Glide Dashboard. Remember to verify the X-Glide-Signature header even in development — see Webhooks.