Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
    Overview
    Testing
    Testing use cases
    Sandboxes
    Test Apple Pay and Google Pay rendering
Stripe CLI
Sample projects
Tools
Stripe Dashboard
Workbench
Developers Dashboard
Stripe for Visual Studio Code
Terraform
Stripe Discord server
Features
Workflows
Batch jobs
Event destinations
Stripe health alertsStripe SignalsFile uploads
AI solutions
Agent toolkit
Model Context ProtocolBuild agentic AI SaaS Billing workflows
Security and privacy
Security
Activity logsStripebot web crawler
Privacy
Extend Stripe
Overview
Build Stripe apps
Use apps from Stripe
Build extensions
Custom objects
Partners
Partner ecosystem
Partner certification
United States
English (United States)
  1. Home/
  2. Developer resources/
  3. Testing

Test your integration

Test your Stripe integration before going live.

Before going live, test your Stripe integration to confirm it handles payments, errors, and edge cases correctly. Stripe provides sandboxes, test card numbers, and test API keys so you can simulate real transactions without moving money or processing payments through card networks.

Test environments

A sandbox is an isolated test environment. Payments, customers, and other objects you create in a sandbox don’t affect your live integration. You can create up to five sandboxes to give teams separate environments, and invite external users without exposing live data. Access your sandboxes from the account picker in the Dashboard or through the Stripe CLI. Learn more about sandboxes and the test mode sandbox.

Test cards and simulated payments

Use test card numbers to simulate successful payments, declines, disputes, refunds, and 3D Secure authentication. Test cards work with your test API keys and behave like real cards—for example, 4242 4242 4242 4242 simulates a successful Visa charge.

You can also test non-card payment methods such as ACH Direct Debit, SEPA, and bank redirects. Each payment method has its own test values.

Webhooks and events

Trigger test events to confirm your webhook endpoints handle notifications correctly. You can send test events from the Dashboard or with the Stripe CLI.

Test card numbers and values

Find test card numbers, PaymentMethods, and tokens to simulate payments, declines, disputes, and so on.

Testing use cases

See common testing scenarios, compare the test mode sandbox and general sandboxes, and review QA best practices.

Sandboxes

Create and manage isolated test environments for your team.

Test Apple Pay and Google Pay

Verify your digital wallet integration works correctly.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc
On this page