---
updatedAt: 2026-09-02T01:50:27.000Z
agentTools:
  projectIndex: https://docs.zeptopayments.com/llms.txt
---

# Test in the Sandbox

Test the success and failure paths of a Flow integration before you go live.

<div class="zepto-docs-hero">
  <div class="zepto-docs-hero__content">
    <span class="zepto-docs-hero__badge">DEVELOPER GUIDE</span>
    <h1>Test in the Sandbox</h1>
    <p>Exercise the success and failure paths of a Flow integration before going live.</p>
  </div>
  <div class="zepto-docs-hero__visual" aria-hidden="true">
    <div class="zepto-docs-hero__glow"></div>
    <div class="zepto-docs-hero__icon">
      <img class="logo" alt="Zepto Flow" src="https://files.readme.io/dcc5db35e266b31d34fe90b3c87705e876f39854b29984127983f42e647d2187-Integration.png">
    </div>
  </div>
</div>

Build and test your integration against the **sandbox** environment. In the sandbox, payments are simulated and no real money moves. Create sandbox Payment Intents and load the sandbox bundle (`https://go.sandbox.zeptopayments.com/flow/assets/flow.js`). Then run the widget from start to end.

## Test both terminal outcomes

A complete integration handles the two ways a session can end. Test each way:

| Outcome     | What you should see                                                           | Your page should                         |
| ----------- | ----------------------------------------------------------------------------- | ---------------------------------------- |
| **Settled** | The workflow resolves to `zepto:payto:payment-settled`.                       | Confirm the payment (redirect, receipt). |
| **Failed**  | The workflow resolves to `zepto:payto:payment-failed` with an `errors` array. | Show the error and offer a retry.        |

A failure carries a Zepto error code. Use it to adjust your messages. For example:

| Code      | Meaning                                                       |
| --------- | ------------------------------------------------------------- |
| `ZPADD01` | Alias not found. The payer's PayID could not be resolved.     |
| `ZPPAY01` | Over daily limit. The payment is more than the payer's limit. |

<Zepto_Callout type="tip" title="Test the retry path, not just the happy path" id="test-the-retry-path">
A rushed integration breaks on the failure branch. Make sure your `zepto:payto:payment-failed` handler shows the error. It must also let the payer try again.
</Zepto_Callout>

## Debug the flow during development

Mount with `dev.debug` to show a flow debugger sidecar beside the widget. It logs each request and response as the workflow advances. This helps you see which step you are on and what the API returned.

```js
ZeptoFlow.mount('#zepto-flow', {
  token,
  action,
  dev: { debug: true },
});
```

<Zepto_Callout type="warning" title="dev.debug is a development aid only" id="dev-debug-is-a-dev-aid">
Turn it off before you ship. Use it for local development only, not production.
</Zepto_Callout>

## Go live

When your integration handles both outcomes correctly:

1. Point your backend at the **live** Payment Intent endpoint.
2. Load the **live** SDK bundle (`https://go.zeptopayments.com/flow/assets/flow.js`).
3. Remove `dev.debug`.

A `token` works only with the bundle for the environment it was created in. Switch both together.

## Next steps

Reference the complete client API in the **[SDK reference](https://docs.zeptopayments.com/docs/zepto-flow-sdk-reference)**.