Test card numbers
Use the generator below to create test card numbers for the Sandbox environment. Each card number encodes a specific combination of transaction response, AVS result, and security code verification outcome — allowing you to simulate different processing scenarios. Select your desired responses from the dropdowns, or click the BIN portion of the generated number to enter a custom 6-digit BIN.Test card numbers are only valid in the Sandbox environment. They will be rejected in
production.
Common test scenarios
When you first connect to Tesouro in Sandbox, validate the following end-to-end flows:- Create a test transaction using your product’s standard UI or API calls, and confirm that Tesouro accepts the request, returns the expected response payload and status, and persists the transaction in your reporting or back-office tools.
- Confirm a transaction lifecycle from creation through completion (for example: created → pending → succeeded/failed) and verify that each status update is surfaced correctly in your product and stored in your own database or logs.
- Test idempotency and retries by resending the same request with the same idempotency key and confirming that no duplicate transactions are created and responses remain consistent across retries.
Error simulation
In addition to happy-path flows, verify how your integration behaves when Tesouro returns errors or delays:- Simulate declines — Use documented test data that causes Tesouro to return common decline codes. Confirm that your product surfaces a clear error message and logs the decline reason.
- Simulate timeouts — Configure requests that intentionally exceed time limits or use Tesouro-provided test parameters that trigger delayed responses. Verify that your integration applies reasonable timeouts and implements safe retries without creating duplicate transactions.
- Test validation errors — Send requests with missing required fields, invalid formats, or unsupported parameter values. Confirm that Tesouro returns structured error details and your integration parses and logs them.
Webhook testing
If your integration relies on webhooks for asynchronous events (for example, transaction status updates or payout events), use Sandbox to validate your webhook consumer:- Configure a Sandbox webhook endpoint — Register a dedicated non-production URL with Tesouro for receiving events.
- Verify event handling — Confirm that your service validates webhook signatures (if provided), parses the payload, and handles re-delivered events idempotently.
- Test retries and failure behavior — Temporarily configure your endpoint to return non-2xx responses and verify how Tesouro retries webhook deliveries in Sandbox.