Overview
Thorough testing prevents production issues by validating every payment path before going live. This guide covers test card numbers, payment method matrices, error simulation, and end-to-end checklists for Yuno sandbox integrations.Test Card Numbers
Use these card numbers in the Yuno sandbox environment. All test cards use any future expiry date and any 3-digit CVV (or 4-digit for Amex).Successful Payments
Declined Payments
Special Scenarios
Test card numbers only work in the sandbox environment. Using them in production will result in an error.
3DS Test Flows
3D Secure adds an authentication step to card payments. Yuno sandbox supports testing both frictionless and challenge flows.Frictionless Flow (No Customer Interaction)
The issuer authenticates the cardholder silently based on risk signals. No redirect or challenge is presented.
Expected flow:
- Create payment with card token
- Response includes
status: SUCCEEDEDdirectly (no redirect) payment_method.three_d_secure.status=AUTHENTICATED
Challenge Flow (Customer Interaction Required)
The issuer requires the customer to complete a challenge (SMS code, biometric, etc.).
Expected flow:
- Create payment with card token
- Response includes
status: PENDINGandredirect_url - Redirect the customer to the
redirect_url - In sandbox, a simulated challenge page appears
- Customer completes (or fails) the challenge
- Customer is redirected back to your
callback_url - Final payment status delivered via webhook
Testing 3DS in your integration
Payment Method Test Matrix by Country
Brazil (BR / BRL)
Mexico (MX / MXN)
Colombia (CO / COP)
Chile (CL / CLP)
Argentina (AR / ARS)
Error Simulation
HTTP error codes
Simulate API-level errors by using specific values in your test requests:Provider-level errors
Provider declines are simulated using specific test card numbers (see Test Card Numbers above). These simulate real-world decline scenarios:- Soft declines (retriable): insufficient funds, issuer timeout, generic decline
- Hard declines (do not retry): invalid card, expired card, stolen card
- Gateway errors: provider unavailable, processing timeout
Timeout simulation
To test your timeout handling:- Use card number
4000 0000 0000 0051(processing timeout) - Your request will hang for 30 seconds, then return a timeout error
- Verify your client handles the timeout gracefully
- Check that your webhook handler processes the async status update
Non-Card Payment Method Testing
PIX (Brazil)
- Create a payment with
payment_method.type: "PIX" - Response returns
PENDINGstatus withqr_codeandqr_code_url - In sandbox, PIX payments auto-complete after approximately 30 seconds
- Verify your webhook handler receives
payment.succeeded - Check that your UI updates from the pending state
OXXO (Mexico)
- Create a payment with
payment_method.type: "OXXO" - Response returns
PENDINGstatus with voucher reference number - In sandbox, simulate payment via Dashboard > Payments > [payment] > Simulate Payment
- Verify webhook delivery for
payment.succeeded
Bank Transfer / PSE
- Create a payment with
payment_method.type: "BANK_TRANSFER"or"PSE" - Response returns
PENDINGstatus withredirect_url - Redirect to the URL to see the simulated bank page
- Complete the simulated flow
- Verify redirect back to your
callback_urland webhook delivery
End-to-End Test Checklist
Payment creation
- Successful card payment (Visa, Mastercard)
- Declined card payment (insufficient funds)
- Hard declined card payment (invalid card)
- PIX payment with QR code generation (BR)
- OXXO voucher generation (MX)
- Bank transfer redirect flow (CO)
- Missing required fields return clear error messages
- Invalid authentication returns 401
3DS flows
- Frictionless 3DS authentication succeeds
- Challenge flow redirects correctly
- Customer completes challenge successfully
- Customer abandons challenge (payment fails)
- Callback URL receives correct parameters
Two-step flows
- Authorization creates payment with
AUTHORIZEDstatus - Full capture transitions to
SUCCEEDED - Partial capture with reduced amount
- Cancel (void) releases authorized funds
- Expired authorization handled gracefully
Refunds
- Full refund on succeeded payment
- Partial refund with correct remaining amount
- Multiple partial refunds up to original amount
- Refund on uncaptured payment returns error
Webhooks
- Webhook signature verification passes for valid events
- Invalid signatures are rejected with 401
- Duplicate events handled idempotently
- All subscribed event types received and processed
- Handler responds within 15 seconds
Error handling
- Network timeouts handled with appropriate retry logic
- Rate limiting (429) triggers exponential backoff
- Provider errors (500) surface meaningful messages
- Invalid payloads return descriptive validation errors
SDK integration (if applicable)
- SDK initializes with correct checkout session
- Payment form renders all enabled payment methods
- Card tokenization produces valid one-time token
- SDK callbacks fire for success, error, and cancel
- SDK version matches server-side API version requirements