Tapaya

Testing

Validate your online payments integration against the sandbox environment with test cards.

Test your Checkout integration in the Tapaya sandbox before taking live payments. Sandbox payments use test cards, so no real money moves. Production Checkout accepts real payments from approved merchants.

Point your server at the sandbox API

Set TAPAYA_CHECKOUT_API_URL to https://api.sandbox.tapaya.com and store a merchant checkout key in TAPAYA_CHECKOUT_API_KEY. Keep both on your server.

.env
TAPAYA_CHECKOUT_API_URL=https://api.sandbox.tapaya.com
TAPAYA_CHECKOUT_API_KEY=tapaya_test_...

Complete onboarding with the online payments capability and check that the merchant is Ready in Checkout settings. Save return URLs if you use Hosted Checkout.

Create a test session

Create a session for a test order, exactly as in the Quick Start Guide. Store the returned id with the order before redirecting, so you can check the result even if the browser is closed.

Pay with a test card

Open the session's url and pay with one of the cards below, any future expiry date, and CVC 123.

Verify from your server

Retrieve the session from your server and compare its order reference, amount, currency, and paymentStatus with the stored order. The browser returning to your success URL does not prove payment.

Test cards

Use these test cards.

ScenarioCard numberResult
Payment succeeds4242 4242 4242 4242successful Fulfill the order once.
Card is declined4916 0184 7581 4056failed The session stays open; the customer can try another card.
3D Secure required4012 0018 0000 0016challenge Complete the test challenge, then fulfill after retrieval confirms success.

A processing-error card can pass tokenization and fail only when charged, so always check the retrieved status rather than the card form's reaction.

What the sandbox covers

  • Hosted Checkout: cards, using the test cards above. Wallet buttons depend on the merchant's settings and the customer's device, so they may not appear in every test.
  • Embedded Checkout: cards and wallets. Apple Pay needs a registered shop domain. See Add Apple Pay and Google Pay.
  • Sessions: accept payments for 30 minutes. Use a new merchantOrderId for each test, because an order can be paid only once.
  • Wallets: Google Pay's TEST sheet may record a simulated payment without charging money. Test wallet delivery and saving on real devices.

Test saved cards and delivery

Use a new order reference for each test, and check every pending result from your server.

  • Customer details and delivery quotes
  • Saving a card, including a zero-amount check
  • Saved-card payments: the customer paying with 3-D Secure, and you charging later
  • Manual capture: partial capture, release, expiry, and refunds
  • Each language you support, including your saving terms

When these pass, work through the QA Checklist for retries, lost responses, and customers who never return.

Missing something on this page?Request a feature. We attach this page so the team sees the context.