Skip to content
Payment Emulator Lab

YOUR SANDBOX. YOUR RULES.

Test payments.
Real
possibilities.

Your local lab for payment integrations. Emulate selected Mercado Pago, Stripe and PayPal flows with an API, checkout and control over every outcome.

Independent of your provider’s sandbox.

LOCAL ENVIRONMENTReady to experiment

POST → 200Illustrative view · no real money

No real credentialsNo real cardsNo real moneyRuns locally

FAMILIAR CONTRACTS

The gateways you integrate. An environment you control.

Test your integration flow using each provider’s own vocabulary.

Selected flowsMercado Pago

From order to refund

Orders

Creation, transactions, processing, capture, cancellation and refunds.

  1. Create
  2. Process
  3. Capture
  4. Refund
Explore flows and limits
Selected flowsStripe

Capture on your terms

PaymentIntents · Refunds

Create/confirm, manual capture and refunds, with Stripe-shaped errors.

  1. Create
  2. Confirm
  3. Capture
  4. Refund
Explore flows and limits
Selected flowsPayPal

Approval flow included

Orders v2 · Payments v2

Local OAuth, approval, authorization, capture, void and refunds.

  1. Create
  2. Approve
  3. Capture
  4. Refund
Explore flows and limits

Selected flows, not complete catalogues. Read the fidelity reports for exact coverage and limitations.

HOW IT WORKS

Change the destination. Keep your integration.

Register an application, configure its local credentials and point your integration at the emulator. Every request follows an observable path.

Explore the architecture
RequestHTTP → Contract → Outcome
  1. Your applicationSend the request
  2. Emulator APIValidate the contract
  3. Provider emulatorTranslate the operation
  4. Fake bank + ledgerRecord the movement
  5. WebhookNotify the outcome
  6. Your applicationProcess the event

One shared path. Each provider’s contract at the edges.

DETERMINISTIC SCENARIOS

That tricky edge case. One scenario away.

An approved payment, a decline or a pending action. Choose the outcome to reproduce the case you need to debug, over and over.

Same scenario. Same outcome.

Assign the scenario to your application or use X-Emulator-Scenario per request.

Design scenarios
creation scenario
Contractpayment.createWebhook enabled

stripe/payment-approved.json

{
  "provider": "stripe",
  "version": 1,
  "when": {
    "operation": "payment.create"
  },
  "then": {
    "outcome": "captured",
    "webhook": {
      "enabled": true,
      "delayMs": 50
    }
  }
}
Canonical outcomecaptured

Interactive example · no requests are sent

Illustrative tracetrace_demo

One request. Its complete history.

  1. Inboundrequest.received
  2. Validationcontract.validated
  3. Scenarioscenario.matched
  4. Responseresponse.sent
Webhook delivery

Worker · signature · retries · history

WEBHOOKS + TRACES

Follow the payment. Understand the why.

Inspect which contract was validated and which scenario matched. Review webhook deliveries and retries, and connect the request to your logs through its correlation ID.

FAKE BANK. REALISTIC ACCOUNTING.

Every movement has a counterpart.

Payments are more than magic states. The fake bank records double-entry postings to track captures, fees, reserves, settlements and refunds.

Balances derived from postings. Amounts in minor units. No real money.

Meet the fake bank
Difference between debits and credits0.00 USDOne currency · double entry
Simplified example · external capture
AccountDebitCredit
System cash100.00 USD
Funds in transit100.00 USD

Debits = credits

ONE LAB, THREE SURFACES

Integrate. Simulate. Inspect.

Three separate applications, connected through the API.

Illustrative preview
RequestPOST /v1/payment_intents
{
  "amount": 10000,
  "currency": "usd",
  "confirm": true
}
Local · API

API

For your integration

Provider contracts, scenarios and payment operations, powered by NestJS.

Contracts and API
Illustrative preview
Applications
demo-storeStripe
Payments
payment_demoCaptured

Console

For developers

Applications, local credentials, payments, ledger, webhooks and traces.

Open the console
Illustrative preview
Test card100.00 USD
•••• 4242
Simulated payment

Checkout

For buyers

Test the buying experience with each provider’s visual identity and flow.

Explore the checkout

FROM REPOSITORY TO FIRST PAYMENT

Your next sandbox lives on your machine.

Clone the repository and run the installer. It checks Node, prepares the environment, installs, builds, migrates and creates your administrator.

Installation guide
Terminal · repository root
npm run setup

What the installer prepares

  • 01Node version and environment
  • 02Dependencies and build
  • 03Database migrations
  • 04Administrator account

Node ≥ 22.17 · Docker Compose or local PostgreSQL

Docker leaves the stack running. In local mode, start the processes using the guide.

  1. 01Clone
  2. 02Set up
  3. 03Run
  4. 04Integrate
  5. 05Simulate
  6. 06Inspect

DOCUMENTATION WITHOUT GUESSWORK

Fewer assumptions. More answers.

Spanish and English guides, from your first run to the limits of each contract.

Browse all documentation

FREQUENTLY ASKED

What is worth knowing before you start.

Short answers, each with the document behind it.

Browse all documentation

What is Payment Emulator Lab?

A local payment gateway emulator: an API, a console, a checkout and a fake bank with double-entry accounting. It runs entirely on your machine.

Project overview

Do I need real credentials or cards?

No. You register your application in the emulator and it issues the local credentials you sign each request with. No real card or account is involved.

Getting started

Does it replace the Stripe, PayPal or Mercado Pago sandbox?

No, and it is not an official product of those providers. It emulates selected flows in their vocabulary; the fidelity reports state what is covered and what is not.

Features and limits

Which flows are supported?

Mercado Pago with Orders; Stripe with PaymentIntents and refunds; PayPal with Orders v2 and Payments v2. Each fidelity report details the scope per provider.

Stripe report

Can I test webhooks and debug what happened?

Yes. The emulator emits an event for each operation, records its deliveries and keeps the trace of the request that produced them.

Webhooks and traces

Can I force a decline or a specific case?

Yes. Deterministic scenarios bind a condition to an outcome, so the same case reproduces identically every time you need it.

Deterministic scenarios

YOUR NEXT PAYMENT IS A TEST

Stop testing payment integrations with real money and credentials.

Your code, your scenarios and an environment to understand every outcome.