Skip to content
NovaroPayDocs
2026-11-22.acaciacurrent
Theme
Merchant portal(opens in a new tab)

Test webhooks locally with the CLI

The novaro CLI sends your account’s test-mode events to a server on your machine, signed as your endpoints’ are, so you can build and debug your webhook handler before it is on the internet.

  1. Install it. Every release is on github.com/novaro-pub/novaro-cli, and these are its only channels:

    System How
    macOS, Linux brew install novaro-pub/tap/novaro
    Windows scoop bucket add novaro https://github.com/novaro-pub/scoop-bucket, then scoop install novaro
    Debian, Ubuntu, Fedora the .deb or .rpm package of a release
    Docker docker run --rm -it ghcr.io/novaro-pub/novaro version
    Any other the archive for your system from a release

    novaro version prints the version you have; brew upgrade novaro or scoop update novaro moves to the latest.

    Each release’s checksums.txt, which names every archive and package, is signed with cosign by the release’s own workflow. To check a download, keep checksums.txt and checksums.txt.sigstore.json from the same release beside it:

    Terminal window
    cosign verify-blob --bundle checksums.txt.sigstore.json \
    --certificate-identity-regexp '^https://github.com/novaro-pub/novaro-cli/' \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt
    shasum -a 256 --check --ignore-missing checksums.txt
  2. Pair it with your account. novaro login shows a pairing code and opens the merchant portal’s Allow CLI access page; someone who keeps your account’s integration checks the code is the same and confirms. The page offers the accounts of the company you have open in the portal: switch to the right company first, or the key is of another company’s account.

    Terminal window
    novaro login

    novaro gets a CLI key (rk_test_…) and keeps it in your system’s keychain. It works in test mode only, for 90 days, and may only read events, resend them, and create, read and confirm test payments. The portal lists it under Developers › API keys › CLI keys with your machine’s name, where you can expire it. In CI, pass a test secret key instead: --api-key sk_test_… on any command.

    novaro calls our API at the address novaro login paired with. To call another, such as a local or a staging API, pass --api-base <url> on any command, or set NOVARO_API_BASE.

--forward-to is the address of your own webhook handler on your machine: the port your server listens on and the path of its webhook route. localhost:3000/webhooks below is an example: put in yours, such as localhost:8080/api/novaro/webhook for an Express server on port 8080 with app.post("/api/novaro/webhook", …).

Terminal window
novaro listen --forward-to localhost:3000/webhooks

novaro prints this machine’s signing secret (whsec_…) and then each event as it comes, with your server’s answer:

Ready! Your webhook signing secret is whsec_… (^C to quit)
2026-10-16 12:00:00 --> payment.succeeded [evt_in_…]
2026-10-16 12:00:00 <-- [200] POST http://localhost:3000/webhooks [evt_in_…]
  • Each event is a POST with the same body and headers as a delivery to an endpoint: verify PSP-Signature with the secret novaro printed, as the Signatures page shows. The secret is this machine’s and stays the same when you run novaro listen again; novaro listen --print-secret prints it and exits, for your server’s configuration.
  • Your server’s answer is the delivery’s attempt: a 2xx within 10 seconds is received. An event sent to novaro is tried once, never retried, and an event made while novaro isn’t listening isn’t sent to it later: read those with GET /events.
  • While it listens, the portal’s Webhooks page (test mode) shows the machine as a Local listener. Your endpoints keep getting their events as usual.
Option What it does
--forward-to <url> Where to send each event. localhost:3000/webhooks means http://localhost:3000/webhooks. Without it, novaro shows the events and answers each as received.
--events <types> Only these types, comma-separated: payment.succeeded,payment.failed. All of them when left out.
--api-version <version>, --latest Shape the events in this API version, or in the latest one. Your account’s default when left out.
--headers "Key: Value, …" Headers to add to each forwarded request.
--skip-verify Accept any certificate of an https:// --forward-to, a self-signed one included.
--format json Print each event’s JSON on a line of its own instead.

novaro trigger creates a test payment with POST /payments and, except for payment.created, confirms it with a UTR: a magic one for payment.succeeded and payment.failed, an ordinary one for payment.processing. The event, and every event before it, goes out as from your own integration: to novaro listen and to your test endpoints.

Terminal window
novaro trigger payment.succeeded
novaro trigger payment.failed --override amount=50000 --override metadata.order=42
Event How
payment.created A payment waiting for the payer.
payment.processing Confirmed with an ordinary UTR; it stays processing, as a live payment whose money nobody has seen yet, until its late-payment window closes and it fails (Testing).
payment.succeeded Confirmed with the magic UTR 000000000001; it succeeds within a second or two.
payment.failed Confirmed with the magic UTR 000000000003; it fails about 5 seconds later.

--override field=value sets a field of the payment, customer.email=… and metadata.key=… included. novaro trigger --list lists what it makes.

novaro trigger makes payments only. A report run you create with a test secret key (sk_test_…) sends reporting.report_run.succeeded to novaro listen too, as to your test endpoints, once its file is ready; a CLI key (rk_) cannot create runs. A failed run cannot be made on purpose in test mode: a run fails only when it cannot be prepared. Build your handler of reporting.report_run.failed from the report run object, whose status is failed and error says why.

The example integration has a webhook handler you can run this against: npm start, then novaro listen --forward-to localhost:3000/webhooks.

Terminal window
novaro events list --type payment.* --limit 5
novaro events retrieve evt_in_…
novaro events resend evt_in_… --webhook-endpoint whe_in_…

events list and events retrieve are GET /events, events resend is POST /events/{id}/retry: one more attempt of the event’s delivery to that endpoint, as Resend in the portal. They read test mode; pass --live --api-key sk_live_… for live mode.