API Reference

💳 Test Cards

Credit Card Simulator

The Sandbox Credit Card payment method lets you simulate credit card transaction flows without processing real payments. Use it to test different scenarios during integration and QA.

Supported flows

You can simulate the following flows with this payment method:

  • Authorization (approve / decline)
  • Capture (partial and full)
  • Cancellation (void / cancel)
  • Inquiry / status check

How it works

You can either generate a 16‑digit card number with any online card generator or pick random digits yourself. For sandbox tests, only the last digit matters. The first 15 digits may be arbitrary and the 16th (last) digit) determines the simulated transaction outcome.

Keep the CVV and expiry in realistic formats for gateway compatibility:

  • CVV: 3 digits (e.g., 123)
  • Expiry: MM/YYYY (e.g., 12/2030)

Card format example

XXXX.XXXX.XXXX.XXXX
First 15 digits: random/any
Last digit: controls the response

Example: 4024 0071 5376 3191 → last digit 1 → will simulate an authorized response (see table below).

Last‑digit mapping (transaction status & return codes)

The simulator inspects the card’s final digit and returns the corresponding status and return code:

Last digitTransaction StatusReturn CodeReturn Message
0, 1, 4Authorized4 / 6Operation completed successfully
2Not Authorized05Not authorized
3Not Authorized57Expired card
5Not Authorized78Blocked card
6Not Authorized99Timeout
7Not Authorized77Canceled card
8Not Authorized70Credit card problems
9Random Authorization4–99Operation Successful / Timeout (random)

Example: 4024 0071 5376 3191 → final digit 1Authorized (code 4 or 6 depending on gateway handling in sandbox).

Important notes & warnings

  • The sandbox environment validates format and the final digit of the card number to decide the response. If you send a real card number in sandbox, the outcome will still be determined by the sandbox rules (final digit), so do not use real card numbers in tests.
  • Return codes in Sandbox are not the same as Production. Sandbox return codes and behaviors are for testing only.
  • To check production return codes and messages, consult your Production API reference / Return Codes documentation — production mappings and issuer codes may differ.
  • If your gateway requires a specific card length or format, apply the same last‑digit mapping concept: keep the final digit as per the table and adjust other digits to match gateway expectations.
  • For batch testing, vary only the final digit to exercise multiple scenarios while keeping other fields consistent.