Test data and magic values

In a sandbox, payments go through a simulated connector: no money moves, and the outcome depends only on the amount you send. You can test every path, failures and payments that stay pending included, without waiting for a real provider.

Magic values

The connector reads the last two digits of amount_cents (the amount in cents). For example, 1,250.00 MZN sent as 125000 ends in 00 and confirms at once; 125009 stays pending.

Last two centsExample (amount_cents)OutcomeRequires sandbox advanceDescription
00125000confirmedNoPayment confirms immediately and triggers confirmation webhooks.
02125002failedNoPayment fails immediately with a simulated decline.
05125005expiredNoPayment session expires without settlement.
09125009pendingYesPayment stays pending until advanced via sandbox advance.
any other125013confirmedNoAny other cent suffix defaults to immediate confirmation.

Each outcome produces the same events as a real payment: a confirmed payment sends payment.received and, when it settles the invoice, invoice.paid.

Advance pending payments

A payment ending in 09 stays pending until you advance it. With no options the CLI confirms every pending payment in the sandbox; --payment and --outcome pick one payment and its outcome.

bash
gotactl sandbox advance
gotactl sandbox advance --payment pay_7QmXc2Lk9ZtR4wYb --outcome expired

Trigger events

To test your webhook receiver without setting up the scene by hand, the CLI creates the sandbox data that produces these events:

EventCommand
customer.createdgotactl events trigger customer.created
account.createdgotactl events trigger account.created
invoice.issuedgotactl events trigger invoice.issued
invoice.paidgotactl events trigger invoice.paid
payment.receivedgotactl events trigger payment.received
reading.acceptedgotactl events trigger reading.accepted
webhook.testgotactl events trigger webhook.test

Next steps