# Agent skill Source: https://docs.jenzy.com/agent-skill Give your agent the full integration. Install it one time, and the agent obeys the rules of this API. You can build with an agent that writes code: Claude Code, Cursor, Codex, or another agent that reads instructions from your repo. Give the integration to that agent. You do not need to describe it. The skill contains the same rules that Jenzy engineers obey: * the money model * idempotency * how to get a fee quote * how to verify a webhook signature * the risks that cost integrators one day of work The skill makes "integrate Jenzy payouts" into a sequence. Your agent can obey the sequence, and it can check its own work against the sequence. ## Install the skill ```bash theme={null} npx skills add jenzy-treasury/skills --skill hermes-mwk ``` That command installs the skill into the current project. Add `-g` to install it for each project on your machine. Add `--agent` to select one agent: ```bash theme={null} npx skills add jenzy-treasury/skills --skill hermes-mwk -g --agent claude-code -y ``` Claude Code reads the skill in the next session. Ask it to integrate Jenzy payouts, or use the name `/hermes-mwk`. > [card] [jenzy-treasury/skills](https://github.com/jenzy-treasury/skills) > > The source of the skill, and the copy that your agent installs. Read it > before you install it. It is plain markdown. ## What is in the skill | File | Contents | | - | - | | `SKILL.md` | The integration: seven steps. Each step ends with a condition that your agent can check. | | `reference/endpoints.md` | Each endpoint, the payout lifecycle, the fees, the limits, and the sandbox test accounts. | | `reference/errors.md` | Each error code, and when to send the request again. | | `reference/webhooks.md` | The wrapper, the event list, how to verify a signature, and the payload fields that you can trust. | | `scripts/smoke-sandbox.sh` | Ping, fee quote, simulated pay-in, payout, and a poll to a terminal state, against the sandbox. | The skill has links to these docs. It does not keep a copy of them. So an agent that can read a URL always has the current reference. ## Test the loop before you write code The script in the skill does the full path against the sandbox. It shows the real response at each step. It also tests the two errors that integrators make most often: * The fee quote must agree with the credit exactly. * A second request with the same `Idempotency-Key` must give the same payout, and must not make a second payout. ```bash theme={null} JENZY_API_KEY=jz_live_… .claude/skills/hermes-mwk/scripts/smoke-sandbox.sh ``` The script operates only against the sandbox host. So it can spend only test money. To change the test, add `--rail bank` or `--amount 20000`. ## What the skill does not do The skill has the rules of this API. It does not have your business logic. It does not choose your data model, your retry infrastructure, or your ledger design. The skill holds your agent to the parts where an error costs money: * decimal money values * one `Idempotency-Key` for each payout * a fee quote before you send a payout * a reversal as the correct signal, while your balance catches up # Create a bank payout Source: https://docs.jenzy.com/api-reference/create-a-bank-payout /openapi.json post /payouts/bank Hold funds and queue a payout to a bank account. The endpoint is the rail — there is no rail field in the body. Requires an Idempotency-Key. # Create a mobile money payout Source: https://docs.jenzy.com/api-reference/create-a-mobile-money-payout /openapi.json post /payouts/momo Hold funds and queue a payout to a mobile money number. The endpoint is the rail — there is no rail field in the body. Requires an Idempotency-Key. # Get a collection Source: https://docs.jenzy.com/api-reference/get-a-collection /openapi.json get /collections/{id} One collection by id — a pay-in that credited your balance. # Get a payout Source: https://docs.jenzy.com/api-reference/get-a-payout /openapi.json get /payouts/{id} One payout by id — the polling read for a payout you created. # Get balance Source: https://docs.jenzy.com/api-reference/get-balance /openapi.json get /balance Your ledger balance — available to draw down vs held by in-flight payouts. Unsettled trades and in-flight holds are exactly the difference from your raw wallet. # List collections Source: https://docs.jenzy.com/api-reference/list-collections /openapi.json get /collections Your collections — pay-ins that credited your balance — newest first. Pass `next_before_id` back as `before_id` for the next page; null means done. # List institutions Source: https://docs.jenzy.com/api-reference/list-institutions /openapi.json get /institutions Everywhere you can send money: banks and mobile money operators alike, each with the rail it rides. Pick an `institution_id` here before creating a payout — the same identifier both create endpoints take. Only payable institutions are listed. # List payouts Source: https://docs.jenzy.com/api-reference/list-payouts /openapi.json get /payouts Your payouts, newest first. Pass `next_before_id` back as `before_id` for the next page; null means done. # Ping Source: https://docs.jenzy.com/api-reference/ping /openapi.json get /ping The auth tracer: exercises the full key → org → allowlist → rate-limit chain and echoes who you are. The first call to make when wiring up a key. Still answers when the API shutter is closed — `status` is `maintenance` or `outage` then, and every other `/v1` route returns 503. # Quote the fees on a transfer Source: https://docs.jenzy.com/api-reference/quote-the-fees-on-a-transfer /openapi.json post /fees/quote What a transfer would cost, before you make it. Priced from fee schedule, so the same transfer is always quoted the same amount for you, so this is the figure to check against rather than a percentage from the docs. It is not a commitment and reserves nothing. The four fee lines always sum to `total_fee`. Fee amounts are exact decimal strings at two decimal places (kwacha fees are not whole kwacha) — parse them with a decimal library, never a float. A payout returns `total_debit` (the amount plus the fee: your beneficiary still receives the full amount) and a collection returns `amount_received` (the amount less the fee, which may be negative on a transfer smaller than its own fee). # Simulate a pay-in (sandbox only) Source: https://docs.jenzy.com/api-reference/simulate-a-pay-in-sandbox-only /openapi.json post /collections/simulate Fund your sandbox balance by pretending a customer paid you. Sandbox only — in production this returns `403 sandbox_only`, because real money can only arrive by being sent to your account number. The simulated pay-in is a real pay-in in every way that matters to your integration: it becomes an ordinary collection, it credits your balance net of the fee, and it fires the `collection.settled` webhook. Nothing marks it as simulated, so the code you write against it is the code that runs in production. **This request is not idempotent.** A `202` means the pay-in exists at the provider but has not credited yet — poll `GET /collections` rather than sending it again, or you will create a second pay-in. Only `4xx` and `503` mean nothing was created. Otherwise, repeat it as often as you like — each call is an independent collection. # Authentication Source: https://docs.jenzy.com/authentication Bearer API keys, key rotation, IP allowlists, and rate limits. Each request to `/v1` uses an API key. An org admin makes the key in the Hermes portal, under **Integration → API keys**. Send the key as a bearer token: ```bash theme={null} curl https://api.jenzy.com/v1/ping \ -H "Authorization: Bearer jz_live_AbC123XyZ..." ``` ## Keys * A key has no internal structure: `jz_live_` and then a long random body. Only the first 16 characters show again. These characters are the **prefix**, for example `jz_live_AbC123Xy`. The prefix shows in your portal, in audit trails, and in support conversations. Use the prefix to identify a key to Jenzy. * **The portal shows the full key one time only, when you create it.** You cannot get the key again. Put the key in your secrets manager now. If you lose a key, make a new key and revoke the old key. * Your org can hold a maximum of 3 active keys. At that limit, the portal disables the **Create key** button. Revoke a key that you do not use to make a slot free. * Each key starts with `jz_live_`, in the sandbox and in production. Hermes does not make `jz_test_` keys. The prefix does not tell you the environment. The base URL selects the environment. A sandbox key operates only against `api.sandbox.jenzy.com`. See [Test in the sandbox](/testing). > [!WARNING] > > Your key can spend your balance. Do not put the key in client-side code, in > logs, or in URLs. If you think that a key leaked, revoke it in the portal > at once. A revocation is immediate. Then tell Jenzy. ## Key rotation Your org can hold more than one active key at the same time. So a rotation is an overlap, and not a single event. 1. In the portal, open **Integration → API keys**. 2. Select **Rotate** on the key. The portal makes the replacement key first. 3. Change your systems to the new key. 4. Select **Revoke** on the old key. The old key stays valid until you revoke it. So your org always has a key, and you do not need to plan a period of downtime. A rotation makes a key before it removes one. If your org holds 3 active keys, revoke a key that you do not use first. ## IP allowlist (optional) An org admin can limit your key to an exact list of IP addresses. The list is in the Hermes portal, under **Integration → IP allowlist**. If the list is not empty, a request from a different address gets `403 forbidden`. The key alone is then not enough. Each entry is one exact IPv4 or IPv6 address. The list does not accept CIDR ranges. Only a portal session can change the list. An API key cannot change the list. So a person who steals a key cannot add an address to the list. ## Rate limits Hermes applies a rate limit to each org. Above the limit, you get this body: ```json theme={null} { "error": { "code": "rate_limited", "message": "rate limit exceeded" } } ``` The response is HTTP `429`. The response also has a `Retry-After` header, in seconds. Obey the header and decrease your request rate. If you read `GET /balance` and `GET /payouts/{id}` at a moderate rate, you stay below the limit. `org_limit_exceeded` is different. That code is a limit on the number of new payouts, and not a limit on the number of requests. See [Errors](/errors). # Errors Source: https://docs.jenzy.com/errors Each stable error code: its meaning, its HTTP status, and when to send the request again. Each error uses the same wrapper. The wrapper has a stable `code` and a `message` for a person to read. Use the `code` to select the action in your integration. The text of the `message` can change. ```json theme={null} { "error": { "code": "insufficient_funds", "message": "..." } } ``` Jenzy publishes these codes. Jenzy never renames a code and never removes a code. Jenzy only adds codes. Use the `code` field. Do not use the `message` field or the HTTP reason text. ## Two groups of codes There are two groups of errors. The two groups do different things with your money. * **Rejections** (the first table) — Hermes refused the request. **Hermes created no payout and held no money.** Correct the request, or wait, and then send the request again. * **Failure codes** (the second table) — Hermes accepted the payout, held the funds, and the payout failed later. The payout is terminal, and Hermes sets `failure: { code, message }`. **Hermes always releases the hold back to your available balance.** To try again, always create a *new* payout with a *new* `Idempotency-Key`. ## Rejection codes | Code | HTTP | Meaning | Send again? | | - | - | - | - | | `validation_error` | 400 | The request has an error: bad JSON, an absent field, or no `Idempotency-Key` on a create. | Yes, after you correct the request. | | `unauthorized` | 401 | The API key is absent, malformed, revoked, or unknown. | No. Correct the key. | | `forbidden` | 403 | Jenzy suspended your org, or your allowlist does not have the request IP. | No. Speak to Jenzy, or correct the allowlist. | | `not_found` | 404 | Your org has no such resource. An unknown id, an id of a different org, and a malformed id all look the same. | No. | | `insufficient_funds` | 402 | The amount is more than your available balance. | Yes, after you fund the balance. Send money to your account number. | | `conflict` | 409 | You used this `Idempotency-Key` with a different body, or the first request is still in progress. | For a different body, use a new key. For a request in progress, use the same key after a short time. | | `unknown_institution` | 422 | The rail of this endpoint cannot pay the `institution_id`. The message tells you if the id is unknown or on the other rail. | Yes, after you read `GET /institutions` again, or after you call the endpoint of the other rail. | | `invalid_mobile_number` | 422 | The mobile number is not 12 digits in the full international form. Use `265`, then `9` for Airtel Money or `8` for TNM Mpamba, then 8 digits. An example is `265991234567`. Hermes never corrects a number for you. | Yes, after you correct the number. | | `mobile_number_institution_mismatch` | 422 | The network of the number is not the institution that you chose. Examples are a `2659…` number sent to TNM Mpamba, and a `2658…` number sent to Airtel Money. That payout can go to the wrong destination. The message names the correct institution. | Yes, after you choose the institution that agrees. The number is correct. | | `invalid_account_number` | 422 | The account number is not valid for the destination bank. | Yes, after you correct the number. | | `amount_limit_exceeded` | 422 | This payout is above the per-payout maximum. | Yes, with a smaller amount. | | `rate_limited` | 429 | You sent too many requests. | Yes. Obey the `Retry-After` header. | | `org_limit_exceeded` | 429 | Your org went above its daily cap or its payout velocity limit. | Yes, later. | | `internal_error` | 500 | Hermes has an internal problem. | Yes. On a create, use the **same** `Idempotency-Key`. You get the first result, and never two payouts. | | `rail_disabled` | 503 | An administrator paused this rail. | Yes, later. | | `service_unavailable` | 503 | A dependency is not available. For example, the reference data did not sync one time. | Yes, later. | | `service_incident` | 503 | Jenzy paused the full `/v1` API to examine a problem. **Your balance is safe. Each payout that Hermes accepted is safe. Hermes retries nothing.** | Yes, later. On a create, you can use the **same** `Idempotency-Key`. A pause never uses a key. | | `service_maintenance` | 503 | Jenzy paused the full `/v1` API for planned work. | Yes, later, with the same key. | ## Failure codes A `failed` payout has one of these codes in `failure.code`. The code is the same on `GET /payouts/{id}` and in the `payout.failed` webhook. The `failure.message` text does not change for a given code. You can show that text to your own users. | Code | Meaning | Can a second payout succeed? | | - | - | - | | `recipient_account_invalid` | The provider refused the destination. The account does not resolve, or the number is not valid. | Only after you correct the destination. | | `declined` | The provider declined the payout, or failed it with no reason. Hermes uses this code when no other code applies. | Not usually. Examine the payout before you send it again. | | `provider_unavailable` | The downstream provider had a timeout or an outage. | Yes. Send a new payout after a short time. | | `temporarily_unavailable` | Hermes had a temporary condition. | Yes. Send a new payout later. Hermes took no funds. | ## When Jenzy pauses the API See [Maintenance and outages](/maintenance-and-outages) for the procedure that your system must obey. `service_incident` and `service_maintenance` are the only two codes that mean *Jenzy stopped this on purpose*. They are different from each other rejection in one way: **they do not use your `Idempotency-Key`.** Each other decided result, a new payout or a `4xx`, is final for that key. A pause is not a decision. So the safe action is the same key with the same body. You then get a payout, and not a `conflict`. While one of the two codes applies: * **Each `/v1` route, but not `GET /ping`,** gives 503. This includes the read endpoints, `POST /fees/quote`, the payout creates, and `POST /collections/simulate`. * `GET /ping` continues to answer. Its `status` field is `outage` for an incident, or `maintenance` for planned work. * Payouts that Hermes accepted before the pause stay in `held`. Hermes did not send them. They did not fail. No money moved for them. They continue automatically when the pause ends. * Hermes still delivers the webhooks for payouts that already got a result. Jenzy does not send a `Retry-After` header with these codes. A person at Jenzy decides when a pause ends. So a timestamp from Jenzy would only be a guess. > [!NOTE] > > Hermes never sends a failed payout again. The four codes above are the > complete set of failure codes. Hermes uses `declined` for each failure that > does not agree with the other three codes. # Go live Source: https://docs.jenzy.com/going-live Move your integration from the sandbox to production. When your integration works in the [sandbox](/testing), move it to production. Production moves real money. Change your integration with care. Test each step. ## Change the addresses Production has its own dashboard and its own API base URL. Change both. | Surface | Sandbox | Production | | :- | :- | :- | | Dashboard | `https://hermes.sandbox.jenzy.com` | `https://hermes.jenzy.com` | | API | `https://api.sandbox.jenzy.com/v1` | `https://api.jenzy.com/v1` | In your code, change the API base URL from `api.sandbox.jenzy.com` to `api.jenzy.com`. Keep the `/v1` path and every route the same. ## Go-live checklist The sandbox and production are separate environments. They do not share keys, balances, webhooks, or settings. You must set up each item again in production. **1. Get a production API key** Sign in to the production dashboard at `https://hermes.jenzy.com`. Your production account is separate from your sandbox account, so Jenzy ops must activate it one time. Then open **Integration → API keys** and select **Create key**. Your sandbox key does not operate in production. Store the new key in your secrets manager. See [Authentication](/authentication). **2. Fund your balance with a real pay-in** Production has no Top up desk. To fund your balance, send MWK to your org's account number. The portal shows the number, under **Integration → Account number**. When the money arrives, Hermes credits your balance and sends a `collection.settled` webhook. See [Pay-ins](/pay-ins). **3. Register your webhooks again** Webhook endpoints are per environment. Register your production endpoint in the production dashboard. Then verify the signature with your production signing secret. See [Webhooks](/webhooks). **4. Set your IP allowlist again** The IP allowlist is per environment. If you use one, add your production server IPs in the production dashboard. See [Authentication](/authentication). ## Before your first live payout Do a final check in production, with small amounts: **1. Check your key** Send `GET /ping` to `api.jenzy.com`. Confirm the response shows your org and `"status": "live"`. **2. Send one small payout** Create one small payout to a destination that you control. Confirm the result by webhook or by `GET /payouts/{id}`. > [!WARNING] > > In production, every payout moves real money. There is no test number, and > there is no undo. Do your first live payouts with your Jenzy contact. # Introduction Source: https://docs.jenzy.com/introduction Pay Malawian kwacha to banks and mobile money from a prefunded balance. Jenzy Hermes is a payout API for Malawi. You prefund a Malawian kwacha (MWK) balance. To do this, you trade USDT with Jenzy over the counter. Your system then draws that balance down. Each payout is one API call to a Malawian bank account or to a mobile money number. > [!WARNING] > > **Production keys move real money.** Each payout that you create in > production is final. Build and test your integration in the > [sandbox](/testing) first. Then do the steps in [Go live](/going-live). ## The model 1. **Fund your balance** — send MWK to your org's account number. The portal shows the number, under **Integration → Account number**. The money becomes a collection and credits your balance. Jenzy subtracts one percentage fee: 1.5% as standard, or your agreed rate. See [Pay-ins](/pay-ins). 2. **Draw the balance down** — your system creates payouts against the balance with `POST /payouts/bank` or `POST /payouts/momo`. Hermes holds the funds when it accepts the payout. Hermes settles the funds when the payout succeeds. 3. **Track the result** — Hermes tells you when a payout gets to a terminal state. Use [webhooks](/webhooks), or read `GET /payouts/{id}`. ## Base URL Production: ```text theme={null} https://api.jenzy.com/v1 ``` Sandbox: ```text theme={null} https://api.sandbox.jenzy.com/v1 ``` All requests use HTTPS. All bodies are JSON. All endpoints need your [API key](/authentication). Build and test in the [sandbox](/testing) first. ## Money values **Hermes sends you MWK amounts as exact decimal strings with two decimal places.** Two examples are `"250000.00"` and `"99177.50"`. The kwacha has a subunit: the tambala. One tambala is one hundredth of a kwacha. Jenzy charges fees in tambala. Because of this, a balance of `"99177.50"` is correct. **You can send MWK amounts to Hermes in two forms.** Use a JSON integer of whole kwacha, for example `250000`. Or use an exact decimal string with a maximum of two decimal places, for example `"250000.50"`. Hermes refuses a fractional JSON number. Send `"100000.05"`. Do not send `100000.05`. This rule keeps a request for a subunit clear in your request body. Read each money field with a decimal library. Do not use `parseFloat`. ## Where to start > [card] [Quickstart](/quickstart) > > Key, balance, first payout, and confirmation. Five curl calls. > [card] [Payouts](/payouts) > > Rails, fees, statuses, and how to track a payout to its result. > [card] [Pay-ins](/pay-ins) > > How money comes into your balance, and what it costs. > [card] [Webhooks](/webhooks) > > The event list, and how to verify a signature. > [card] [Errors](/errors) > > Each error code, its meaning, and when to send the request again. > [card] [Maintenance and outages](/maintenance-and-outages) > > How your system must operate when Jenzy stops the API. > [card] [Authentication](/authentication) > > Keys, key rotation, IP allowlists, and rate limits. # Maintenance and outages Source: https://docs.jenzy.com/maintenance-and-outages How your system must operate when Jenzy stops the API. Jenzy can stop the `/v1` API. The stop is **maintenance** or an **outage**. * A **maintenance** is work that Jenzy plans. * An **outage** is a problem that Jenzy examines. The two stops use the same rules for money and for a request that you send again. They use different words for your users. ## What operates during a stop | Item | During a stop | | - | - | | `GET /ping` | Operates | | All other `/v1` routes | Give HTTP 503 | | Payouts that Jenzy accepted before the stop | Stay in `held`. They do not fail. They do not move money | | Webhooks for payouts that already completed | Continue | Jenzy does not try accepted payouts again until the API operates. ## How you know Send `GET /ping`. Read the `status` field. | `status` | Meaning | | - | - | | `live` | The API operates | | `maintenance` | Jenzy stopped the API for planned work | | `outage` | Jenzy stopped the API because of a problem | Sandbox and production are different host names (`api.sandbox.jenzy.com` and `api.jenzy.com`). The host name is not a field in the ping response. If `status` is `maintenance` or `outage`, do not send other `/v1` requests. If you send other `/v1` requests during a stop, you get HTTP 503: | Ping `status` | Error `code` | | - | - | | `maintenance` | `service_maintenance` | | `outage` | `service_incident` | Use the `code` field to select the action. Do not use the `message` field. Do not use the HTTP reason text. `GET /ping` with a bad key gives HTTP 401. This lets you see the difference between a stop and a bad key. There is no `Retry-After` header. Jenzy does not tell you when the API will operate again. A person at Jenzy starts the API again. ## Procedure Do these steps in this sequence. **1. Find the stop** Send `GET /ping` when one of these happens: * You get HTTP 503 with `service_maintenance` or `service_incident`. * You start your system. * A create request does not complete. ```bash theme={null} curl https://api.jenzy.com/v1/ping \ -H "Authorization: Bearer $JENZY_API_KEY" ``` ```json theme={null} { "org": "Acme Remittances Ltd", "key_prefix": "jz_live_AbC123Xy", "status": "maintenance" } ``` **2. Stop new creates** Do not send `POST /payouts/bank`. Do not send `POST /payouts/momo`. Do not send `POST /collections/simulate`. Do not send `POST /fees/quote`. Keep the work in your system until `GET /ping` shows `"status": "live"`. **3. Wait. Then send ping again** Send `GET /ping` again. Increase the wait after each try: 1. Wait 30 seconds. 2. Wait 1 minute. 3. Wait 2 minutes. 4. Wait 5 minutes. 5. Then wait 5 minutes between each try. Do not send more than one ping in each wait. Do not send create requests while you wait. **4. Send the create again** When `status` is `live`: * Use the **same** `Idempotency-Key`. * Use the **same** request body. * Send the create again. A stop does not record an `Idempotency-Key`. The same key does not cause a `conflict`. Do not make a new `Idempotency-Key` for the same payout. A new key can cause a second payout. **5. Read your payouts** Send `GET /payouts`. Compare the list with your records. Payouts that Jenzy accepted before the stop continue when the API operates. You do not send those payouts again. ## Text for your users If `status` is `maintenance`, use this text: > We stopped payouts for planned work. Nothing is wrong with your money. Try again when the work is complete. If `status` is `outage`, use this text: > We stopped payouts while we examine a problem. Your balance is safe. Payouts that we already accepted are safe. We do not try those payouts again until the API operates. Do not tell your users that a payout failed. A stop is not a failure. ## Money during a stop Payouts that Jenzy accepted before the stop: * Stay in `held`. * Do not fail. * Do not move money. * Continue when the API operates again. Webhooks for payouts that already completed continue during the stop: * `payout.succeeded` * `payout.failed` * `payout.reversed` You cannot send `GET /payouts` or `GET /balance` during the stop. Use the webhooks that you already received. Use your records. When the API operates again, send `GET /payouts` to find the state of each payout. See [Payouts](/payouts) and [Webhooks](/webhooks). ## What you must not do * Do not make a new API key because of a stop. * Do not make a new `Idempotency-Key` for the same payout. * Do not send create requests in a loop. * Do not treat `service_incident` or `service_maintenance` as `internal_error`. * Do not treat a stop as a failed payout. * Do not wait for a `Retry-After` header. That header is not on these responses. ## Related * [Errors](/errors#when-jenzy-pauses-the-api) — the two pause codes * [Payouts](/payouts#idempotency) — how an `Idempotency-Key` operates # Pay-ins Source: https://docs.jenzy.com/pay-ins Money sent to your account number becomes a collection, costs one percentage fee, and credits your balance. Your org has its own Malawian account number. A person can send MWK to that number from a mobile wallet or from a bank account. The money then arrives in Hermes as a **collection**. Hermes credits your balance, sends a `collection.settled` event to your webhook endpoint, and adds the collection to `GET /collections`. There is no work for you on the side of the sender. The payer uses their own bank app or mobile money app. You only read the result. ## Your account number Your account number is in the Hermes portal, under **Integration → Account number**. Give the number to each person who pays you. All money that goes to the number becomes a collection. ## What a pay-in costs A pay-in costs **one percentage fee of the amount sent, with nothing more**. The standard rate is **1.5%**. If you agreed a different rate with Jenzy, that rate applies. Your balance gets the amount sent, less that one fee. * There is no minimum amount and no flat component. * Do not write the percentage into your code. `POST /fees/quote` gives the figures for your own rate. It is the only safe source if your rate is not the standard rate. * Hermes rounds the fee to the tambala. Do not calculate the fee with a multiplier, because your result can be one tambala different. Call `POST /fees/quote` with `direction: "collection"` to get the exact figures before the money moves. The quote agrees with the credit exactly. * A pay-in is **MWK only**. ## The collection resource Read collections with `GET /collections` and `GET /collections/{id}`. `GET /collections` puts the newest collection first and uses keyset pagination. The `data` field of the `collection.settled` event uses the same shape. ```json theme={null} { "id": "7a4be2a4-90f4-4a5e-b7c9-1d2f5f6f8a31", "status": "settled", "amount_mwk": "100000.00", "fee": "1500.00", "amount_credited": "98500.00", "rail": "momo", "source_customer_name": "PETER BANDA", "source_account_number": "265991234567", "source_institution": "Airtel Money", "rtp_reference_number": null, "created_at": "2026-08-05T09:40:53.000Z" } ``` The three money figures always agree: `amount_mwk − fee = amount_credited`. The fee is one combined figure. Hermes does not divide it into lines. Hermes gives you the full identity of the sender, exactly as the provider reports it. Use the identity to match a pay-in to your own customer. For mobile money, `source_account_number` is the wallet number of the payer. > [!WARNING] > > The identity of a payer is personal data. You must protect that data under > your own privacy obligations. Hermes sends exactly one `collection.settled` event for each movement of your balance. This is true for each way that Hermes finds the pay-in. Process each event `id` one time only. After an outage, use `GET /collections` to catch up. A poll and a webhook give the same data. ## Reversals Sometimes a provider takes a pay-in back after it settles. Hermes then sends you a `collection.reversed` event. The `status` of the collection changes to `reversed` on the read endpoints. > [!WARNING] > > **Use the event as the correct signal, and let your balance catch up.** > > For a short time after a `collection.reversed` event, `GET /balance` can > read **high**. The provider already took the money back. A person in Jenzy > operations posts the correction manually. Jenzy confirms the exact amount > case by case. > > Do not give goods or services against a balance that includes a reversed > pay-in. > > A reversal is not usual, and Jenzy always examines one. Speak to support if > you get a reversal that you cannot explain. # Payouts Source: https://docs.jenzy.com/payouts Draw your balance down to a Malawian bank account or mobile money number. A payout moves money out of your prefunded balance to a beneficiary in Malawi. You create a payout with one API call: `POST /payouts/bank` or `POST /payouts/momo`. Hermes holds the funds at once. Hermes then tracks the transfer to a terminal state. For money that comes *into* your balance, see [Pay-ins](/pay-ins). ## The two rails There is no `rail` field to set. **The endpoint that you call selects the rail.** | Rail | Endpoint | Destination | | - | - | - | | Mobile money | `POST /payouts/momo` | A wallet number on Airtel Money or TNM Mpamba | | Bank | `POST /payouts/bank` | A bank account number | The two rails use the same `institution_id` from `GET /institutions`. Each entry in that list tells you its rail. If you send an institution to the wrong endpoint, Hermes refuses the request with `unknown_institution`. Hermes does not send the money to a different rail. See [Quickstart](/quickstart) for the full request body of each rail. ## Idempotency Each create request needs an **`Idempotency-Key`** header. Make one key for each payout that you intend to send. You can use a UUID. Send the same key with the same body again, and Hermes returns the first response again, with the same bytes. Because of this, a network timeout or a second request cannot cause two payments. The same key with a *different* body gives `409 conflict`. Use a key a second time only to send the same payout again. A `202` response means that Hermes **decided**: the funds are on hold and the payout is in a queue. A `4xx` response means that **nothing happened**. There is no payout and there are no funds on hold. ## What a payout costs Jenzy passes payout fees to you **at cost** and adds no margin. This is the schedule: | Line | Rate | | - | - | | Transaction fee | 0.94% of the amount (0.8% + VAT) | | Convenience fee — mobile money | 235 MWK flat (200 + VAT) | | Convenience fee — bank | 587.50 MWK flat (500 + VAT) | | Government levy | 0.05% of the amount, only on payouts above 100,000 MWK | The convenience fee applies to each payout, at all amounts. There is no minimum amount, and Jenzy does not remove the fee for large amounts. The government levy applies only above 100,000 MWK. At or below that amount, the levy is zero. The figures above include VAT, in a rounded form. Hermes rounds each fee line to the tambala separately. So a fee that you calculate from these rates can be one tambala different. `POST /fees/quote` gives the exact figure. **Example — a payout of 10,000 MWK:** | Line | Momo | Bank | | - | - | - | | Transaction fee (0.94%) | 94.00 | 94.00 | | Convenience fee | 235.00 | 587.50 | | Government levy (below 100,000 MWK) | 0.00 | 0.00 | | **Total fee** | **329.00** | **681.50** | | **Total debit** (amount + fee) | **10,329.00** | **10,681.50** | Two rules come from the pass-through fee: * **The create response does not tell you the exact fee in advance.** Call `POST /fees/quote` with `direction: "payout"` before you send the payout. The quote gives the exact fee and the `total_debit`. The `total_debit` is the amount plus the fee, and it is the money that leaves your balance. Your beneficiary still gets the full `amount_mwk`. **Use `POST /fees/quote` as the correct source of the exact figures.** The table above is a simple version of your agreed commercial terms. It is not a replacement for the quote. The quote shows VAT as its own `vat` line and does not add VAT to each fee line. So compare your figures on `total_fee`, and not line by line. * **Hermes knows the fee for certain only after the provider reports it.** The `fee` field of a payout is `null` while the transfer is in progress. Hermes then writes the charge from the provider into the field. Hermes never calculates that charge itself. > [!NOTE] > > When Hermes accepts a payout, it holds the `amount_mwk` **and** the quoted > fee. Your available balance must cover the two together. Your balance can > be less than the amount, or less than the amount plus the fee. In both > conditions, you get `insufficient_funds` (402). More fee rules: * Hermes charges a fee only on a payout that **succeeds**. A `failed` payout always shows `fee: "0.00"`. Hermes releases the full hold, the amount and the fee, back to your available balance. * A `reversed` payout keeps its fee, because the payout did succeed before the provider took the money back. * A `null` fee does not mean that the payout is free. It means that Hermes does not know the fee yet. Do not use `null` as zero. Do not use `null` to decide if a payout is still in progress. The `status` field tells you that. * Hermes calculates the hold from the fee schedule. When the payout settles, Hermes compares the hold with the charge from the provider. Hermes returns the difference to your available balance. The `fee` field always shows the charge that Hermes observed, and never the first quote. So the debit from your balance can be a small amount different from the quote. ## The payout resource Read payouts with `GET /payouts` and `GET /payouts/{id}`. `GET /payouts` puts the newest payout first and uses keyset pagination. The create response and the `data` field of each payout webhook use the same shape. ```json theme={null} { "id": "0d5e63b2-59f3-4d2a-8f57-2f14a3c14f6d", "amount_mwk": "5000.00", "fee": "282.00", "rail": "momo", "status": "succeeded", "destination": { "institution_id": 112400, "mobile_number": "265991234567", "beneficiary_name": "Chikondi Banda" }, "failure": null, "created_at": "2026-07-08T09:14:02.000Z", "terminal_at": "2026-07-08T09:14:31.000Z" } ``` ### Status lifecycle ``` held → submitted → pending → succeeded | failed ``` * **`held`** — the funds are on hold. Hermes did not send the payout to the provider yet. * **`pending`** — Hermes sent the payout and waits for the result from the provider. This is the only status where a payout waits. A payout can stay here for some time if the provider is slow to confirm. Hermes reads the status again. Hermes does not send the payout a second time. * **`succeeded`** / **`failed`** — terminal. No other status is final. * **`reversed`** — the payout succeeded, and then the provider took the money back. This is not a failure. The `failure` field stays `null`. The `terminal_at` field keeps the time of the *first* success, and not the time of the reversal. Hermes sets `terminal_at` one time, when the payout first gets to `succeeded` or `failed`. The field then never changes, not even at a later reversal. ## How to learn the result **Webhooks (recommended)** — an org admin registers an endpoint in the Jenzy portal. Hermes then sends `payout.succeeded`, `payout.failed`, or (not often) `payout.reversed` a few seconds after the result. See [Webhooks](/webhooks) for the event list and how to verify a signature. **A poll** — read `GET /payouts/{id}` again until the status is terminal. A poll and a webhook give the same data. So you can always use `GET /payouts` to catch up after an outage. When a payout fails, Hermes releases the full hold, the amount and the fee, back to your available balance. The `failure.code` field tells you if a second payout can succeed: | Code | Can a second payout succeed? | | - | - | | `recipient_account_invalid` | Only after you correct the destination. | | `declined` | Not usually. Examine the payout before you send it again. | | `provider_unavailable` | Yes. Send a new payout after a short time. | | `temporarily_unavailable` | Yes. Send a new payout later. Hermes took no funds. | Hermes never sends a failed payout again. To try again, always create a **new** payout with a **new** `Idempotency-Key`. If you use the old key, you get the first failure again. > [!WARNING] > > **A reversal needs your attention, and your balance can be late.** > > A `payout.reversed` event tells you that the provider took back a payout > that succeeded before. The recipient no longer has the money. If you gave > goods or services after the `payout.succeeded` event, this event tells you > to act. > > For a short time after the event, `GET /balance` can still show the payout > as spent. A person in Jenzy operations makes the correction manually. > Jenzy confirms case by case if the provider returns its own fee. Use the > event as the correct signal, and let your balance catch up. > > A reversal is not usual, and Jenzy always examines one. Speak to support if > you get a reversal that you cannot explain. ## Limits Three limits apply to each payout. The limits do not depend on your balance. * **Per-payout maximum** — Hermes refuses one payout above the cap with `amount_limit_exceeded` (422). * **Daily cap** — the payout volume of your org in the last 24 hours. * **Velocity** — the payout count of your org in the last 1 hour. The daily cap and the velocity limit both give `org_limit_exceeded` (429). Send the payout again later. Hermes measures the limits on the amount that you asked to send, and not on the amount plus the fee. See [Errors](/errors) for the full table. ## Common rejections Hermes refuses the request and holds **nothing**. See [Errors](/errors) for the complete list. * `insufficient_funds` (402) — the amount plus the fee is more than your available balance. * `unknown_institution` (422) — the rail of this endpoint cannot pay the `institution_id`. Read `GET /institutions` again. * `invalid_mobile_number` / `mobile_number_institution_mismatch` (422, momo only) — the number is not in the full international form. Or the number belongs to the other network. * `invalid_account_number` (422, bank only) — the account number is not valid for the destination bank. * `amount_limit_exceeded` (422) — the amount is above the per-payout maximum. * `rate_limited` (429) / `org_limit_exceeded` (429) — send the request again after the given time. # Quickstart Source: https://docs.jenzy.com/quickstart From an API key to a confirmed payout, in five calls. > [!WARNING] > > This guide uses the production URL. Step 4 moves real money. To test safely, > use the sandbox base URL `api.sandbox.jenzy.com` and the test numbers. See > [Test in the sandbox](/testing). **1. Check your key** Make a `jz_live_…` API key in the Hermes portal, under **Integration → API keys**. Put the key in the `Authorization` header of each request. `GET /ping` tests the full authentication path and shows your org: ```bash theme={null} curl https://api.jenzy.com/v1/ping \ -H "Authorization: Bearer $JENZY_API_KEY" ``` ```json theme={null} { "org": "Acme Remittances Ltd", "key_prefix": "jz_live_AbC123Xy", "status": "live" } ``` **2. Check your balance** Payouts draw your prefunded balance down. `available` is the money that you can spend now. `held` is the money that payouts in progress reserve. Each hold is an amount plus its expected fee. `shortfall` is usually `"0.00"`. A different value shows that fees are more than your balance. Your next pay-in pays the shortfall first. Then it adds to `available`. ```bash theme={null} curl https://api.jenzy.com/v1/balance \ -H "Authorization: Bearer $JENZY_API_KEY" ``` ```json theme={null} { "available": "1250000.00", "held": "50000.00", "shortfall": "0.00", "currency": "MWK" } ``` Amounts are exact decimal strings with two decimal places. Read them with a decimal library. Do not use `parseFloat`. If `available` is too low, send money to your account number. The money arrives as a `collection.settled` webhook and a credit here. See [Pay-ins](/pay-ins). An amount can have a fraction. The subunit of the kwacha is the tambala. Hermes pays a payout of `"100000.05"` to the tambala. **3. Find the destination** Hermes validates a destination when you create the payout. There is no separate validation call. First, you need the `institution_id` for the destination. One list covers both rails. Each entry tells you the rail. ```bash theme={null} curl https://api.jenzy.com/v1/institutions \ -H "Authorization: Bearer $JENZY_API_KEY" ``` ```json theme={null} { "institutions": [ { "institution_id": 112400, "name": "Airtel Money", "rail": "momo" }, { "institution_id": 112500, "name": "TNM Mpamba", "rail": "momo" }, { "institution_id": 221400, "name": "NBS Bank", "rail": "bank" } ], "synced_at": "2026-07-08T06:00:11.000Z" } ``` The list shows only the institutions that Hermes can pay. The list does not change often, so keep it in a cache. Read the list again if a create request gives `unknown_institution`. **4. Create the payout** The endpoint selects the rail. Use `/payouts/momo` for mobile money. Use `/payouts/bank` for banks. There is no rail field in the body. Each create request needs an **`Idempotency-Key`** header. Make one key for each payout that you intend to send. You can use a UUID. Send the same key with the same body again, and Hermes returns the first response again, with the same bytes. Because of this, a network timeout cannot cause two payments. ```bash theme={null} curl -X POST https://api.jenzy.com/v1/payouts/momo \ -H "Authorization: Bearer $JENZY_API_KEY" \ -H "Idempotency-Key: 9f1c7a58-6f2d-4b0e-9d2e-3f8a1c5b7e42" \ -H "Content-Type: application/json" \ -d '{ "amount_mwk": 5000, "institution_id": 112400, "mobile_number": "265991234567", "beneficiary_name": "Chikondi Banda" }' ``` Mobile numbers use the full international form: `265` and then 9 digits. The number must agree with the institution that you choose. A `2659…` number is Airtel Money. A `2658…` number is TNM Mpamba. Hermes refuses a number in a different form. Hermes does not guess the correct number. A `202` response means that Hermes accepted the payout. Hermes holds the amount and puts the payout in a queue. ```json theme={null} { "id": "0d5e63b2-59f3-4d2a-8f57-2f14a3c14f6d", "amount_mwk": 5000, "rail": "momo", "status": "held", "destination": { "institution_id": 112400, "mobile_number": "265991234567", "beneficiary_name": "Chikondi Banda" }, "failure": null, "created_at": "2026-07-08T09:14:02.000Z", "terminal_at": null } ``` A `4xx` response means that **Hermes did not create a payout and did not hold money**. See [Errors](/errors) for each code. For a bank payout, the body is `{ amount_mwk, institution_id, account_number, beneficiary_name }`. All four fields are necessary. **5. Learn the result** A payout is terminal when `status` is `succeeded` or `failed`. No other status is final. There are two ways to learn the result. **Webhooks (recommended)** — an org admin registers an endpoint in your Jenzy portal. Hermes then sends `payout.succeeded` or `payout.failed` a few seconds after the result. See [Webhooks](/webhooks). **A poll** — read the payout again until the status is terminal: ```bash theme={null} curl https://api.jenzy.com/v1/payouts/0d5e63b2-59f3-4d2a-8f57-2f14a3c14f6d \ -H "Authorization: Bearer $JENZY_API_KEY" ``` When a payout fails, Hermes releases the hold back to `available`. The `failure.code` field tells you [if a new payout can succeed](/errors#failure-codes). Hermes never sends a failed payout again. To try again, create a **new** payout with a **new** `Idempotency-Key`. That is the full loop. See [Payouts](/payouts) for the fees, the full status lifecycle, and the payout limits. # Test accounts Source: https://docs.jenzy.com/test-accounts Sandbox bank accounts and mobile wallets you can pay out to. Use these destinations when you create payouts in the [sandbox](/testing). Hermes refuses each other account and each other wallet. These destinations do not operate in production. ## Bank accounts Use these bank accounts to test disbursements to any local bank. The institution id that you use does not matter. | Account number | Response | | :- | :- | | `3333888800` | Successful | | `3333888801` | Successful | | `3333888802` | Successful | | `3333888803` | Successful | | `3333888804` | Successful | | `3333888805` | Successful | | `3333888806` | Successful | | `3333888807` | Successful | | `3333888808` | Successful | | `3333888809` | Successful | ## Mobile wallets Use these mobile wallets to test disbursements to any local mobile network operator: | Phone number | Response | | :- | :- | | `111100000112` | Successful | | `111100000221` | Successful | | `111100000330` | Successful | | `111100000445` | Successful | | `111100000553` | Successful | | `111100000662` | Successful | | `111100000778` | Successful | | `111100000889` | Successful | | `111100000990` | Successful | | `111100000498` | Successful | # Test in the sandbox Source: https://docs.jenzy.com/testing Build and test your integration with test money, on a separate environment. The sandbox is a full copy of Hermes. It runs on its own domain, with its own data. All money in the sandbox is test money. A sandbox request cannot move real funds. Use the sandbox to build and test your integration. Do all of your development here first. When your integration works, do the steps in [Go live](/going-live) to move to production. ## Sandbox addresses The sandbox has its own dashboard and its own API base URL: | Surface | Sandbox | | :- | :- | | Dashboard | `https://hermes.sandbox.jenzy.com` | | API | `https://api.sandbox.jenzy.com/v1` | Send every sandbox request to `api.sandbox.jenzy.com`. A sandbox key does not work against the production API. A production key does not work against the sandbox. ## Get a sandbox key Jenzy ops must activate your account one time. After that, your keys and your integration settings are self-serve. **1. Make an account** Open `https://hermes.sandbox.jenzy.com` and select **Sign up**. Your account then waits. Jenzy ops activates the account and attaches it to your org. **2. Sign in to the sandbox dashboard** Open `https://hermes.sandbox.jenzy.com` and sign in to your org. **3. Make a key** Open **Integration → API keys** and select **Create key**. The full key appears one time only. Copy it now into your secrets manager. Sandbox keys start with `jz_live_`, the same as production keys. The prefix does not tell you the environment. The base URL selects test money or real money. Keep your sandbox key and your production key apart. Label each key clearly. See [Authentication](/authentication). ## Add test funds A payout draws down your balance, so you must fund the balance first. In production you fund the balance with a real pay-in to your account number. In the sandbox you simulate that pay-in yourself. A simulated pay-in is a real pay-in in every way that changes your code. It becomes a collection. It credits your balance less the fee. It sends your endpoint a `collection.settled` webhook. Nothing marks it as simulated. Simulate a pay-in from the API: ```bash theme={null} curl -X POST https://api.sandbox.jenzy.com/v1/collections/simulate \ -H "Authorization: Bearer jz_live_…" \ -H "Content-Type: application/json" \ -d '{ "amount_mwk": 50000, "rail": "momo" }' ``` The response is the collection, already credited: ```json theme={null} { "id": "a4f1c0de-…", "status": "settled", "amount_mwk": "50000.00", "fee": "750.00", "amount_credited": "49250.00", "rail": "momo", "source_customer_name": "PETER BANDA", "source_institution": "Airtel Money" } ``` `amount_mwk` is what the sender pays. The fee comes out of it, so your balance increases by `amount_credited`. This is what production does. To fund a specific balance, ask for more than that balance. Set `rail` to `momo` or `bank` to choose where the sender pays from. The rail does not change the fee. Omit it for `momo`. You can also do this in the sandbox dashboard. Open **Simulate a pay-in** in the Sandbox menu. Every member of the org can use it. Run it as often as you want. Each call is a separate collection. > [!WARNING] > > This request is not idempotent. A `202` means that the pay-in exists, but > it did not credit your balance yet. Do not send the request again. Read > `GET /collections` instead. A second request makes a second pay-in. > > Only `4xx` and `503` mean that Hermes made nothing. > [!NOTE] > > This endpoint is sandbox only. In production it answers `403` with the code > `sandbox_only`. Money can arrive in production only when a sender pays your > account number. ## Make a test payout After your balance has funds, create payouts as in production. Use the same endpoints, the same body, and the same idempotency rules as [Quickstart](/quickstart). Only the base URL is different. The sandbox pays only the given [test accounts](/test-accounts). The sandbox refuses a real bank account or a real mobile number, because it has no connection to the rails. Choose any institution from `GET /institutions` that agrees with the rail of your endpoint. A failed payout releases its hold back to `available`. The `failure.code` field gives the reason. See [Errors](/errors). ## What is real in the sandbox The sandbox tests the full payout path, but with test money: * Balances, holds, payouts, and webhooks behave as in production. * Test funds have no real value. They exist only in the sandbox. * Rate limits, IP allowlists, and idempotency apply, the same as in production. # Webhooks Source: https://docs.jenzy.com/webhooks The event list, the delivery rules, and how to verify a signature. Hermes tells your system when a permanent change happens. Examples are a payout at its terminal state, a pay-in that credits your balance, and a completed conversion. For each change, Hermes sends an event to your webhook endpoint with an HTTP POST. One endpoint serves both Jenzy APIs. Events from the MWK API (`/v1`) and from the Multi-asset API (`/v2`) arrive at the same URL. The signature is the same. The `api_version` field tells you which API the `data` came from. ## Register an endpoint An org admin registers the endpoint in the Hermes portal, under **Integration → Webhook endpoint**. Each org has one HTTPS URL and one active endpoint. When you register an endpoint, Hermes makes a **signing secret** (`whsec_…`). Hermes shows the secret one time only. Keep the secret with your API key. If you replace the endpoint, Hermes makes a new secret. Deliveries that are already in progress continue with the old secret. So while you change the secret, verify each delivery against **both** secrets. ## The event wrapper Each delivery is a JSON POST with the same wrapper: ```json theme={null} { "id": "6a1f0d0e-3f0a-4c6f-9b1e-8d2c5a7e9f31", "event_type": "payout.succeeded", "created_at": "2026-07-08T09:14:31.000Z", "balance": { "available": "1245000.00", "held": "45000.00", "shortfall": "0.00", "currency": "MWK" }, "data": { "...": "the resource — see below" } } ``` * `id` — the key that you use to remove duplicates. Hermes delivers each event one time or more. The same event can arrive more than one time, and events can arrive in a different sequence. Process each `id` one time only, and ignore the repeats. * `balance` — a copy of your MWK balance from the time when Hermes prepared the event. **Do not calculate a balance from webhooks**, because events can arrive in a different sequence. `GET /balance` is the correct source. Only a `/v1` delivery has this field. * `data` — the resource, with the same bytes as the equivalent read endpoint of the API that made the event. * `api_version` — present with the value `"v2"` on a delivery from the Multi-asset API. Absent on a delivery from the MWK API. Use this field to select the parser for `data`. A `/v2` payout has `amount` and `asset`. A `/v1` payout has `amount_mwk`. The `event_type` alone does not tell you which. A delivery from the Multi-asset API looks like this: ```json theme={null} { "id": "9c2e4f1a-7b3d-4e5f-8a6b-1c2d3e4f5a6b", "event_type": "payout.succeeded", "api_version": "v2", "created_at": "2026-09-09T09:14:31.000Z", "data": { "...": "the resource, as GET /v2/... shows it" } } ``` If you use only the MWK API, ignore `api_version`. You never get a delivery that has it. ## Event list | Event | When | `data` | | - | - | - | | `payout.succeeded` | A payout got to its terminal success state. | The payout, as `GET /payouts/{id}` shows it. | | `payout.failed` | A payout failed. Hermes already released its hold. | The payout, with `failure: { code, message }` set. See [failure codes](/errors#failure-codes). | | `payout.reversed` | A payout succeeded, and then the provider reversed it. The provider took the money out of the account of the recipient. | The payout with `status: "reversed"` and `failure: null`. | | `collection.settled` | A person paid into your account, and Hermes credited your balance. Hermes sends this event exactly when the balance moves. | The collection, as `GET /collections/{id}` shows it. On the MWK API it has the gross `amount_mwk`, one combined `fee`, and the `amount_credited`. It also has the rail and the full identity of the sender. That identity is personal data, and you must protect it. On the Multi-asset API it has one `amount` in `asset`, and a `source` with no payer identity. | | `collection.reversed` | A pay-in credited your balance, and then the provider took the money back. See [Pay-ins → Reversals](/pay-ins#reversals). | The collection with `status: "reversed"`. | | `collection.updated` | The `source` of a collection changed one time, after the credit. Nothing else changed. Multi-asset API only. See [Collections → When the source changes](/v2/collections#when-the-source-changes). | The collection, as `GET /v2/collections/{id}` shows it. | | `balance.low` | Your available MWK balance is below the floor that you set. Hermes sends a maximum of one event in each cooldown period. There is no recovery event. MWK API only. | `{ "balance": …, "floor_mwk": "…" }` | | `conversion.completed` | A conversion moved money between two of your balances. Multi-asset API only. | The conversion, as `GET /v2/conversions/{id}` shows it. | | `conversion.failed` | A conversion failed. No money moved. Multi-asset API only. | The conversion, with `failure: { code, message }` set. | | `beneficiary.active` | A USD beneficiary is now `active`. You can pay it. Multi-asset API only. | The USD beneficiary, as `GET /v2/beneficiaries/{id}` shows it. | | `beneficiary.rejected` | A USD beneficiary is `rejected`. This status is final. Multi-asset API only. | The USD beneficiary, with `failure: { code, message }` set. | | `beneficiary.inactive` | A USD beneficiary is `inactive`. You cannot pay it now. Multi-asset API only. | The USD beneficiary, as `GET /v2/beneficiaries/{id}` shows it. | | `child_org.updated` | The `status`, the `requirements`, or the `capabilities` of a Child org changed. The delivery has `org_id`. Multi-asset API only. See [Child orgs](/v2/child-orgs#webhooks). | The Child org, as `GET /v2/child-orgs/{id}` shows it. | | `order.*` | An order changed. Most events are a change of status. `order.refunded` is not: the status stays `failed`. Multi-asset API only. See the list of order events in [Orders → Webhooks](/v2/orders#webhooks). | The order, as `GET /v2/orders/{id}` shows it. | An org admin sets the floor for `balance.low` in the Hermes portal, under **Integration → Balance floor**. You can change the floor at any time. The floor is on your MWK balance only. There is no `balance.low` event on the Multi-asset API. Read `GET /v2/balances` instead. `payout.*` and `collection.*` events come from both APIs. On a `/v2` delivery, `data` is the resource as `GET /v2/payouts/{id}` or `GET /v2/collections/{id}` shows it, and `api_version` is `"v2"`. ## Verify a signature Each delivery has a `Signature` header. The header is the **HMAC-SHA256 of the exact raw request body, with your signing secret as the key, in hexadecimal**. There are no timestamp headers, and there is nothing more to put in order. Sign the bytes that you received. Then compare the two values in constant time. > [!WARNING] > > Calculate the HMAC over the **raw body bytes**, before you parse the JSON. > If you parse the JSON and write it again, the field sequence or the format > changes. The signature then never agrees. ```javascript Node.js (Express) theme={null} import { createHmac, timingSafeEqual } from 'node:crypto' import express from 'express' const app = express() // express.raw so req.body is the untouched Buffer the signature covers app.post('/webhooks/jenzy', express.raw({ type: 'application/json' }), (req, res) => { const secret = process.env.JENZY_WEBHOOK_SECRET // whsec_… const expected = createHmac('sha256', secret).update(req.body).digest('hex') const received = req.get('Signature') ?? '' const a = Buffer.from(expected, 'utf8') const b = Buffer.from(received, 'utf8') if (a.length !== b.length || !timingSafeEqual(a, b)) { return res.status(401).end() } const event = JSON.parse(req.body) // Hermes delivers each event one time or more: drop an event you processed. // if (await alreadyProcessed(event.id)) return res.status(200).end() switch (event.event_type) { case 'payout.succeeded': case 'payout.failed': case 'payout.reversed': // event.data is the payout — same shape as GET /payouts/{id} break case 'collection.settled': case 'collection.reversed': // event.data is the collection — same shape as GET /collections/{id} break case 'balance.low': // event.data is { balance, floor_mwk } — MWK API only break case 'conversion.completed': case 'conversion.failed': // event.data is the conversion — Multi-asset API only, api_version is "v2" break default: if (event.event_type.startsWith('order.')) { // event.data is the order — same shape as GET /v2/orders/{id} } } // event.api_version === 'v2' → data has amount + asset; absent → data has amount_mwk res.status(200).end() // respond 2xx fast; do heavy work async }) ``` While you change the secret, verify against the old secret and the new secret. Accept the delivery if one of the two agrees. ### Compare your result against ours The Hermes portal keeps a record of each delivery, under **Portal → Deliveries**. Open a row to see the exact bytes that Hermes sent, and the signature that Hermes calculated over those bytes. Use the screen when your signature does not agree. It shows you which of the two values is different, and it shows the bytes that your code must sign. > [!WARNING] > > **A reversal needs your attention, and your balance can be late.** A > `payout.reversed` or a `collection.reversed` event tells you that the > provider took back money that already moved. Use the event as the correct > signal, and let your balance catch up. A person in Jenzy operations posts > the correction. For the full detail, see > [Payouts → How to learn the result](/payouts#how-to-learn-the-result) and > [Pay-ins → Reversals](/pay-ins#reversals). ## Delivery rules * Only a **2xx** response counts as a delivery. A redirect is a failure, and Hermes never follows one. Respond in less than 10 seconds, and do the real work after the response. * Hermes tries a failed delivery **5 more times across about 6 hours**. The first tries are close together. Each try sends the same bytes, because Hermes made a copy of the payload at the time of the event. So the signature stays valid across all the tries. * After the last failed try, Hermes puts the delivery in a dead-letter queue and tells Jenzy operations. Hermes never sends it again automatically. * **Portal → Deliveries** lists each try against each of your endpoints, newest first. * If you missed events during an outage, ask Jenzy for a new delivery. Until then, compare your records against `GET /payouts`. A poll and a webhook give the same data, so the list endpoint is always a way to catch up.