Test in the Sandbox
Test the success and failure paths of a Flow integration before you go live.
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. |
Test the retry path, not just the happy 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.
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.
ZeptoFlow.mount('#zepto-flow', {
token,
action,
dev: { debug: true },
});dev.debug is a development aid only
Turn it off before you ship. Use it for local development only, not production.
Go live
When your integration handles both outcomes correctly:
- Point your backend at the live Payment Intent endpoint.
- Load the live SDK bundle (
https://go.zeptopayments.com/flow/assets/flow.js). - 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.
Updated 6 days ago

