Test in the Sandbox

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

DEVELOPER GUIDE

Test in the Sandbox

Exercise the success and failure paths of a Flow integration before going 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:

OutcomeWhat you should seeYour page should
SettledThe workflow resolves to zepto:payto:payment-settled.Confirm the payment (redirect, receipt).
FailedThe 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:

CodeMeaning
ZPADD01Alias not found. The payer's PayID could not be resolved.
ZPPAY01Over 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:

  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.


Did this page help you?