Skip to content

Testing callbacks locally

Your local dev server isn’t publicly reachable, so resultUrl needs a tunnel to receive sandbox callbacks while you build.

  1. Start a tunnel to your local server, e.g. with ngrok: ngrok http 3000

  2. Use the HTTPS URL the tunnel gives you as your resultUrl when creating sandbox transactions — e.g. https://abcd1234.ngrok.app/payments/result.

  3. Send a sandbox test payment using the test credentials and confirm your endpoint receives the POST. The body is plain JSON — see The result callback for the field list.

  4. Run a failing payment too. Failures produce a callback just like successes do, with a different transactionStatus, and that’s the path integrations most often get wrong.

  5. Switch back to your real, publicly reachable resultUrl before going to production.