Skip to content

Get started

Testing in the sandbox

The provider's test environment, selling with no dossier, and knowing it was paid.

Sandbox is not a mock. Your charges go through Infi, pointed at the payment provider's test environment: the same adapter, the same webhook formats and the same failure modes as production. What changes is the account, not the code.

Every sandbox account is born able to sell, with no dossier: the sale is split to Infi's test receiving account, and no real money moves.

What comes back on a pix charge

{
  "provider": "infi_pagarme",
  "method": "pix",
  "status": "pending",
  "pixPayload": "00020101021226…",
  "pixQrImage": "iVBORw0KGgoAAAANSUhEUg…",
  "pixExpiresAt": "2026-08-20T16:30:00Z"
}
  • pixPayload — the copy-and-paste EMV from the provider's test environment. Render it as a QR, the same as in production. It is not payable in a bank app: it is the test environment.
  • pixQrImage — a ready base64 PNG made from the same pixPayload. If it is there, use it instead of generating the QR yourself.
  • If pixPayload comes back empty, the charge exists but cannot be paid. Do not invent a QR from id: show an error and offer another method.

The provider requires the payer's details. Pix asks for a tax id, phone and address; without them the charge stops on a validation error. Collect and pass taxId, payerPhone and payerAddress — the checkout already asks for them.

Knowing it was paid

Confirmation arrives through the provider's webhook, as in production: the invoice becomes paid when the provider says so. There is no page or route to "confirm as if I had paid".

sandboxproduction
Polling the invoice✅ works✅ works
Webhook payment.confirmed❌ 503 on register✅

Registering a webhook in sandbox answers 503 secret_store_unavailable — the secret store is not available to sandbox tenants. So in sandbox, polling is the way:

const paid = await infi.pay.waitForPaid({ slug, invoiceId });
// or, server-side:
const inv = await infi.invoices.get(invoiceId);   // status: "open" | "paid"

The events, signature verification and what to do in production are in webhooks.

What does NOT exist in sandbox

Things that answer with an error and are not your bug:

  • providers.* → 404. Connecting an account of your own provider is a production-only surface, and even there the connection only keeps data: Infi Pay is what charges.
  • webhooks.create → 503, as above.
  • Withdrawals. Sandbox moves no money: a withdrawal is refused.