Skip to main content
Calls that move your customers’ funds out need two things: your API key, and a signature from a payout key that only your servers hold. Rach stores just the public half, so a leaked API key, log line or proxy cannot move money. These calls need a signature:

1. Make a key and register it

In your CaaS dashboard → Developers → Payout keys, an owner or admin pastes the public key (PEM, or the raw 32 bytes in base64 or hex) and gives it a name. You get a key ID. An API key cannot register or revoke payout keys; only a signed-in owner or admin can. You can hold several active keys, for example during a rotation. Revoking one takes effect immediately.

2. Sign each request

Build this message: six lines joined by \n, with no trailing newline.
Sign it with Ed25519 and send these headers:

3. Retry without paying twice

The Idempotency-Key makes each operation happen once, however many times you send it:
  • The same key and the same request returns the first answer again, with the header Idempotency-Replayed: true. Nothing new is sent. Retry after any timeout or 5xx with the same key and a fresh timestamp and signature.
  • The same key with a different request is refused with 409.
  • While the first attempt is still running, a repeat gets 409 (“still being processed”). Wait a moment and retry.
Derive the key from your own record, such as your withdrawal ID, never from a random value generated at send time. A crash and restart then retries the same operation instead of creating a second one.

Refusals

Webhooks from Rach to you also carry a header called X-Rach-Signature. That one goes the other way: an HMAC that Rach computes with your webhook secret. The two are unrelated.
Sandbox (test-mode) keys check the signature exactly as live keys do, then answer with a simulated result and move nothing, so you can prove your signing before going live.