Skip to main content

Overview

The Yuno Testing Gateway is a built-in simulated provider that allows you to test the full payment flow without configuring real provider credentials. It supports cards, PIX, bank transfers, and other payment methods in a controlled sandbox environment.
The Testing Gateway is available by default in all sandbox accounts. No additional configuration is required to start using it.

Supported Payment Methods

Payment MethodTesting Gateway SupportSimulated Behaviors
Credit/Debit CardsYesApprove, decline, 3DS, timeout
PIXYesQR code generation, instant confirmation
Bank TransferYesRedirect simulation, pending status
OXXOYesVoucher generation
PSEYesBank selection, redirect flow

How It Works

1

Enable the Testing Gateway

Navigate to Dashboard > Connections in your sandbox environment. The Yuno Testing Gateway should appear as an available provider. If not enabled, toggle it on.
2

Set routing rules (optional)

By default, sandbox routes all transactions through the Testing Gateway. To test specific routing scenarios, configure rules in Dashboard > Routing Rules.
3

Send test transactions

Use test cards and the standard API flow. The Testing Gateway processes the transaction and returns simulated responses.
const payment = await fetch('https://api-sandbox.y.uno/v1/payments', {
  method: 'POST',
  headers: { /* sandbox auth headers */ },
  body: JSON.stringify({
    checkout_session: 'session-id',
    payment_method: { type: 'CARD', token: 'test-token' },
    amount: { currency: 'BRL', value: 50.00 },
    country: 'BR',
  }),
});
4

Verify results

Check the payment status in the API response or in Dashboard > Payments. The Testing Gateway provides realistic response structures matching real provider formats.

Simulating Specific Outcomes

The Testing Gateway determines the outcome based on the test card number used:
Test CardSimulated Outcome
4111111111111111Approved
4000000000000002Declined (generic)
4000000000009995Declined (insufficient funds)
40000000000032203DS challenge required
For non-card methods (PIX, bank transfer), the Testing Gateway always returns a successful pending status with simulated payment details (QR codes, redirect URLs).

Testing Webhooks

The Testing Gateway triggers webhook events just like a real provider:
EventWhen Triggered
payment.createdPayment submitted
payment.succeededPayment approved
payment.failedPayment declined
payment.pendingAsync payment awaiting confirmation
refund.succeededRefund processed
Some webhook event types may return 404 in sandbox. This is a known sandbox limitation. See Webhook Setup for details.

Limitations

  • The Testing Gateway is only available in sandbox environments
  • Response times are instant (does not simulate real provider latency)
  • Settlement and reconciliation flows are not simulated
  • Provider-specific error codes are generic simulations

Transitioning to Real Providers

When moving to production:
  1. Configure real provider credentials in Dashboard > Connections
  2. Update routing rules to point to production providers
  3. Switch API keys and base URL to production
  4. The Testing Gateway is not available in production