Documentation
Developer Resources

Testing Guide

Test your integration safely using our test mode and test credentials before deploying to production.

Last updated: July 25, 2023

Test Mode Overview

CryptoPay provides a dedicated test environment that mirrors our production system. This allows you to test your integration thoroughly without processing real payments or affecting your live data.

Test Mode Features

  • Full API access with test credentials
  • Simulated payment processing
  • Test webhooks and events
  • Separate test dashboard

Test vs Live Keys

API Key Prefixes
pk_test_...// Test publishable
sk_test_...// Test secret
pk_live_...// Live publishable

API keys are prefixed to strictly indicate their environment.

Test Cards

Tip: You can use these card numbers to simulate successful payments, declines, and authentication challenges. The CVC can be any 3 digits, and the expiry date any future date.
Card NumberBrandDetailsResult
4242 4242 4242 4242
VisaCVC: Any • Exp: Future
Success
4000 0025 0000 3155
VisaCVC: Any • Exp: Future
Requires Authentication
4000 0000 0000 9995
VisaCVC: Any • Exp: Future
Insufficient Funds
4000 0000 0000 0002
VisaCVC: Any • Exp: Future
Card Declined
5555 5555 5555 4444
MastercardCVC: Any • Exp: Future
Success
3782 8224 6310 005
American ExpressCVC: Any • Exp: Future
Success

Testing Webhooks

1. Set up a local listener

Use ngrok or localtunnel to expose your localhost to the internet.

ngrok http 3000

2. Register endpoint

Add your webhook URL in the Developers → Webhooks section of the dashboard.

3. Trigger events

Use the 'Send test webhook' feature to verify your integration handles the payload correctly.

Moving to Production

Verify Account

Complete business verification in settings.

Swap Keys

Replace pk_test_ with pk_live_ keys.

Real Transaction

Process a small amount ($1.00) to verify flow.

Monitoring

Setup alerts for failed webhooks.