WhatsApp and Asaas, running on your machine.

Mock servers of the APIs your product depends on, for local development, tests and CI, starting with WhatsApp and Asaas. Point your application at localhost: same paths, same bodies, same webhooks. And time moves when you say so: a month of billing runs in a second, and you watch your own code react to it.

AMA4DEVS
replay of a run of both mocks
graph.facebook.com/v23.0 localhost:3010/v23.0 api-sandbox.asaas.com/v3 localhost:45445/v3
  1. 27/10/2026
  2. POST /v3/customers 200
    cus_526128665490 Maria Souza
  3. POST /v3/creditCard/tokenizeCreditCard 200
    MASTERCARD 8829, token 5e79adb6…
  4. POST /v3/payments 200
    CREDIT_CARD R$ 350,00 CONFIRMED
    net R$ 339,04, credit on 30/11
  5. webhook PAYMENT_CREATED 200
  6. webhook PAYMENT_CONFIRMED 200
  7. POST /v23.0/1234567890/messages 200
    template appointment_reminder accepted
  8. webhook status sent
  9. webhook status delivered
  10. webhook status read
  11. webhook messages from Maria Souza
    "Oi! Quero remarcar."
  12. 30/11/2026
  13. POST /_admin/clock/advance {"days":34}
  14. webhook PAYMENT_RECEIVED 200
  15. balance R$ 339,04

Every line is from a real run of the two images: the calls, the webhook events and the values. Only the paper is drawn.

Run it on your machine.

Four ways, from the fastest to the most complete. The images are public: no login.

Ready image

The fastest way: the image straight from GHCR.

WhatsApp

docker pull ghcr.io/instituto-ama/whatsapp-mock:latest
docker run -d -p 3010:3010 ghcr.io/instituto-ama/whatsapp-mock:latest

Panel and API at localhost:3010

Mailpit, the payer e-mail inbox

docker run -d -p 8025:8025 axllent/mailpit:v1.31.4

Inbox at localhost:8025

SMS, the payer SMS inbox

docker run -d -p 8899:8899 ghcr.io/instituto-ama/sms-mock:latest

Inbox at localhost:8899

Asaas

docker pull ghcr.io/instituto-ama/asaas-mock:latest
docker run -d -p 45445:45445 -e CLOCK_MODE=VIRTUAL_FLOWING \
  ghcr.io/instituto-ama/asaas-mock:latest

Panel and API at localhost:45445, with the virtual clock on. Asaas finds WhatsApp, Mailpit and the SMS mock by itself: every charge already tells the payer on all three.

In your docker-compose

To run next to your application, in its compose. Nothing to wire: Asaas finds WhatsApp, Mailpit and the SMS mock by service name.

services:
  asaas:
    image: ghcr.io/instituto-ama/asaas-mock:0.11.0
    ports:
      - '45445:45445'
    environment:
      ASAAS_API_KEY: '$$aact_hmlg_local'   # `$$` is a literal `$` in compose
      CLOCK_MODE: VIRTUAL_FLOWING
    depends_on: [whatsapp, mailpit, sms]
    volumes:
      - asaas-data:/data

  whatsapp:
    image: ghcr.io/instituto-ama/whatsapp-mock:0.5.0
    ports:
      - '3010:3010'
    environment:
      WEBHOOK_URL: http://my-app:4000/webhooks/whatsapp   # your application
      MOCK_ALLOWED_HOSTS: whatsapp   # your application calls it by this name
    volumes:
      - whatsapp-data:/app/data

  mailpit:
    image: axllent/mailpit:v1.31.4
    ports:
      - '8025:8025'

  sms:
    image: ghcr.io/instituto-ama/sms-mock:0.2.0
    ports:
      - '8899:8899'

volumes:
  asaas-data:
  whatsapp-data:

From your application: http://asaas:45445/v3 and http://whatsapp:3010/v23.0. The payer e-mails at localhost:8025 and the payer SMS at localhost:8899.

Build from source

To run from the source, or after changing a mock.

git clone https://github.com/Instituto-AMA/ama4devs.git
cd ama4devs

WhatsApp

docker build -t whatsapp-mock mocks/whatsapp
docker run -d -p 3010:3010 whatsapp-mock

Asaas

docker build -t asaas-mock mocks/asaas
docker run -d -p 45445:45445 -e CLOCK_MODE=VIRTUAL_FLOWING asaas-mock

SMS

docker build -t sms-mock mocks/sms
docker run -d -p 8899:8899 sms-mock

With WhatsApp, Mailpit and the SMS mock up, Asaas finds them by itself, as with the ready image.

Run everything

Both mocks and Mailpit, wired together. Every Asaas charge tells the payer three ways: an e-mail in Mailpit, a WhatsApp template through the WhatsApp mock and an SMS in the SMS mock.

git clone https://github.com/Instituto-AMA/ama4devs.git
cd ama4devs
make setup        # starts everything and writes the addresses into .env
ServiceAddressWhat you open there
WhatsApp mocklocalhost:3010Chats, templates, numbers, calls; the API at /v23.0
Asaas mocklocalhost:45445The simulator's panel and its clock; the API at /v3
Mailpitlocalhost:8025The e-mails sent to payers
SMS mocklocalhost:8899The SMS sent to payers; the API at /v1/messages

To point your project at them: write the addresses into its .env and switch the base URLs.

make setup TARGET_ENV=../my-app/.env
- https://graph.facebook.com/v23.0
+ http://localhost:3010/v23.0
- https://api-sandbox.asaas.com/v3
+ http://localhost:45445/v3

A pool of provider mocks.

Each mock is one Docker image for linux/amd64 and linux/arm64. It boots fully configured, keeps its state in a volume and comes with a panel that shows what the real API never lets you see. Two are ready today; more payment providers and banks are on the way.

WhatsApp mock

The Cloud API of the Meta Graph API v23.0, routed and validated against Meta's own OpenAPI file, plus a WhatsApp Web like panel where you are the user on the other side.

The WhatsApp mock panel: a conversation with a template that has an image header, a formatted body, a footer and quick reply buttons.
  • Messages of every type, templates with a review, media, voice notes, receipts.
  • Voice calls with real WebRTC audio and the user's call permission.
  • Business, WABAs and numbers with the SMS code onboarding.
  • Webhooks signed with x-hub-signature-256.

Asaas mock

The Asaas API v3, the Brazilian payment gateway, with the business rules captured from the real sandbox and a virtual clock you move by hand.

The Asaas mock's virtual clock: the simulator's time and mode, and the buttons to advance one, seven or thirty-two days.
  • Customers, Pix, boleto, credit card, installments, subscriptions, splits.
  • Webhooks delivered to localhost, with the real retry rules.
  • A clock you advance: charges go overdue, cards credit at D+32.
  • Saved cards charged on the due date, with Asaas's retries.
  • Payer notifications by e-mail, WhatsApp and SMS.

Next in payments and banking

  • Stripe
  • Rede (Itaú)
  • Pagar.me
  • C6 Bank
  • Banco Inter
  • More bank connections

Planned, not built yet. Each will keep the same promise as the two above: the real API's paths, bodies and webhooks, one image, nothing to configure by hand. The contract every mock follows is in mocks/README.md.

Images and versions.

ImageTags
ghcr.io/instituto-ama/whatsapp-mockOne image per version. <version> is pushed once and never moves: pin it. latest is the newest version, the same image.
ghcr.io/instituto-ama/asaas-mock

The images are public: docker pull needs no login. A push to master that changes a mock runs its tests and publishes it.