Skip to main content
Use https://api.revtain.com for all development and testing. Test mode is controlled by your gateway type — onboard with a test gateway for sandbox behavior.
Test cards and artificial decline codes are only recognised when your primary gateway is a test gateway. Using them with a live gateway will fail.

Test Cards (Test Gateway Only)

Live gateways: Use only real credit card numbers from your actual test merchant accounts (e.g., Stripe Test mode, Braintree Sandbox).

Simulating Failures with Decline Codes

Pass originalDeclineCode values with a test gateway to test how the engine responds to specific decline scenarios.
Forcing a test failure: Use an amount of exactly 44 cents ("amount": 44). This only works with test gateways to simulate a gateway-level failure.

End-to-End Testing with simulateOutcome

The simulateOutcome parameter lets you test recovery logic, retry handlers, and webhook processing without relying on test gateway limitations.

How It Works

1

Set primary gateway to a Test Gateway

Revtain Test Gateway, Stripe test keys, etc.
2

Send a recovery request with simulateOutcome

Set to success, failed, or blocked.
3

Engine returns the simulated response

The corresponding webhook fires automatically.
4

Simulated transactions are flagged

Recorded with isSimulated: true for easy filtering.

Example Request

Use Cases

  • simulateOutcome only works when your primary gateway is a Test Gateway
  • In production, simulateOutcome is silently ignored
  • All simulated transactions return strategyUsed: "simulated" for easy identification