# Build with AI (/docs/ai)
If you write code with an AI assistant (Claude Code, Cursor, VS Code Copilot, Codex, Windsurf, and others), connect it to NuruPay first. It will then use the current API and the safe integration rules instead of guessing.
There are two parts. Use either or both.
| | What it gives your assistant | Install |
| ------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **MCP server** | Live search of these docs and the full OpenAPI spec | Add one URL |
| **Agent rules and skill** | NuruPay's integration rules in `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, and as an agent skill | One command, for this project or globally |
Neither one sees or needs your API keys.
## MCP server [#mcp-server]
URL: `https://docs.nurupay.io/mcp`
It is read-only. It cannot call the NuruPay API, move money, or see your account. It has four tools:
| Tool | What it does |
| ------------------ | ----------------------------------------------------------------------- |
| `search_docs` | Search these docs |
| `read_doc` | Read one page in full, e.g. `webhooks` |
| `list_docs` | List every page |
| `get_openapi_spec` | The complete OpenAPI spec: endpoints, schemas, errors, webhook payloads |
Claude Code
Cursor
VS Code
Codex
Windsurf
Other (stdio only)
```bash
claude mcp add --transport http nurupay https://docs.nurupay.io/mcp
```
```jsonc
// .cursor/mcp.json (this project) or ~/.cursor/mcp.json (everywhere)
{
"mcpServers": {
"nurupay": { "url": "https://docs.nurupay.io/mcp" }
}
}
```
```jsonc
// .vscode/mcp.json
{
"servers": {
"nurupay": { "type": "http", "url": "https://docs.nurupay.io/mcp" }
}
}
```
```toml
# ~/.codex/config.toml
[mcp_servers.nurupay]
url = "https://docs.nurupay.io/mcp"
```
```jsonc
// ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"nurupay": { "serverUrl": "https://docs.nurupay.io/mcp" }
}
}
```
```jsonc
// For assistants that only run local MCP servers
{
"mcpServers": {
"nurupay": { "command": "npx", "args": ["-y", "mcp-remote", "https://docs.nurupay.io/mcp"] }
}
}
```
In **Claude Desktop** or **claude.ai**, open **Settings → Connectors → Add custom connector** and paste the URL.
Then ask, for example: *"Using the NuruPay MCP, add a checkout that charges the customer's phone and marks the order paid from the webhook."*
## Agent rules and skill [#agent-rules-and-skill]
These teach your assistant how to integrate NuruPay correctly:
* keys stay on the server
* an `Idempotency-Key` goes on every `POST`
* only `succeeded` means paid
* webhook signatures are verified on the raw body
* test numbers cover every outcome
One command installs them for every assistant. It writes the rules to the instruction files assistants read, and installs the `nurupay` agent skill.
This project
Global (every project)
```bash
curl -fsSL https://raw.githubusercontent.com/danfordChris/nurupay-skills/main/install.sh | sh
```
```bash
curl -fsSL https://raw.githubusercontent.com/danfordChris/nurupay-skills/main/install.sh | sh -s -- --global
```
| Scope | What it changes |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| This project | Adds a NuruPay section to `AGENTS.md` (read by Codex, Cursor, GitHub Copilot, Windsurf, opencode, and others). `CLAUDE.md` and `GEMINI.md` load it with `@AGENTS.md`, so Claude Code and Gemini CLI follow the same rules. Commit the files to share them with your team. |
| Global | Adds the section to `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`, `~/.config/opencode/AGENTS.md`, and Windsurf's global rules, for the assistants you have installed. |
* **Your files stay yours.** The script only adds, replaces, or removes the section between `` and ``. A `CLAUDE.md` that is already a symlink to `AGENTS.md` is left alone.
* **Re-run it to update. Add `--uninstall` to remove everything it added.** Add `--no-skill` to write only the instruction files.
* **Read it first if you like:** the script and the skill are public at [github.com/danfordChris/nurupay-skills](https://github.com/danfordChris/nurupay-skills).
To install only the skill:
This project
Global
```bash
npx skills add danfordChris/nurupay-skills
```
```bash
npx skills add danfordChris/nurupay-skills -g
```
## Plain-text docs [#plain-text-docs]
For tools that read URLs directly:
| URL | Contents |
| ---------------------------------- | ------------------------------------------------------------------- |
| [`/llms.txt`](/llms.txt) | Index of every page |
| [`/llms-full.txt`](/llms-full.txt) | All docs in one Markdown file |
| `/docs/.md` | One page as Markdown, e.g. [`/docs/webhooks.md`](/docs/webhooks.md) |
| [`/openapi.yaml`](/openapi.yaml) | The OpenAPI spec |
Review AI-written payment code like any other code before it handles live money. Test every outcome with [test numbers](/docs/testing) and work through [Going live](/docs/going-live) first.
# Identify the API key (/docs/api-reference/account/whoami)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# Retrieve your balance (/docs/api-reference/balance/getBalance)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# Create a collection (/docs/api-reference/collections/createCollection)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# Retrieve a collection (/docs/api-reference/collections/getCollection)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# List collections (/docs/api-reference/collections/listCollections)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# Retrieve an event (/docs/api-reference/events/getEvent)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# A collection expired unpaid (/docs/api-reference/webhooks/webhookCollectionExpired)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# A collection failed (/docs/api-reference/webhooks/webhookCollectionFailed)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# A collection was paid (/docs/api-reference/webhooks/webhookCollectionSucceeded)
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
# Authentication and modes (/docs/authentication)
Authenticate every request with your secret key in the `Authorization` header:
```
Authorization: Bearer np_test_sk_...
```
## Test and live mode [#test-and-live-mode]
| Key prefix | Mode | Money |
| ------------- | ---- | ------------------------------------------------------------ |
| `np_test_sk_` | test | Simulated. Use [test numbers](/docs/testing). |
| `np_live_sk_` | live | Real. Requires NuruPay to enable live mode for your account. |
Everything is separated by mode: collections, balances, webhook endpoints, and events created with a test key are invisible to live keys, and the reverse.
## Keep keys secret [#keep-keys-secret]
* Use keys only from your **server**. Never put them in a mobile app, website JavaScript, or a public repository.
* Keys are shown **once** when created. NuruPay stores only a hash and cannot show a key again.
* A key can be restricted to your server's IP addresses. Requests from other IPs get `403 ip_not_allowed`.
## Rotating a key [#rotating-a-key]
When you roll a key, NuruPay issues a new one and the old key keeps working for up to 24 hours, so you can deploy the new key without downtime. After that the old key returns `401 api_key_expired`.
## Authentication errors [#authentication-errors]
| Status | Code | Meaning |
| ------ | ----------------------- | ---------------------------------------------------- |
| 401 | `invalid_api_key` | Missing, malformed, unknown, or revoked key. |
| 401 | `api_key_expired` | A rolled key past its overlap window. |
| 403 | `live_mode_not_enabled` | Live key used before NuruPay enabled live mode. |
| 403 | `merchant_suspended` | Your account is suspended; contact NuruPay. |
| 403 | `ip_not_allowed` | Request came from an IP outside the key's allowlist. |
# Balance and settlement (/docs/balance)
`GET /v1/balance` returns your balances for the key's mode:
```json
{"object": "balance", "mode": "live", "currency": "TZS", "pending": 14700, "available": 0, "reserved": 0}
```
| Balance | Meaning |
| ----------- | ------------------------------------------------- |
| `pending` | Collected (after fees) but not yet settled. |
| `available` | Settled and yours: this is what you can cash out. |
| `reserved` | Held for payouts in progress. |
## Settlement [#settlement]
Collections settle on a **T+1** schedule by default: money collected on a given day (East Africa Time) moves from `pending` to `available` at 00:00 EAT the next day. NuruPay can agree a different schedule with you.
# Changelog (/docs/changelog)
## 2026-09-29 [#2026-09-29]
* First public version: collections (USSD push) on M-Pesa, Airtel Money, Mixx by Yas, HaloPesa, and T-Pesa; balance; events; webhooks with HMAC signatures; idempotency; test mode.
# Collections (/docs/collections)
A **collection** takes money from a customer's wallet into your NuruPay balance using a USSD push.
## Lifecycle [#lifecycle]
```
created ──► pending ──► succeeded
│ └─► failed
└──────► expired
```
| Status | Meaning |
| ----------- | ------------------------------------------------------------------------------------------ |
| `created` | Accepted by NuruPay; the push is being sent. |
| `pending` | The customer's phone has the PIN prompt. |
| `succeeded` | Paid. The money is in your `pending` balance. |
| `failed` | Not paid; see `failure_code` and `failure_message`. |
| `expired` | The customer did not approve in time (30 minutes); the order was cancelled at the network. |
`succeeded`, `failed`, and `expired` are final: a collection never changes after reaching one.
## Channels [#channels]
The network is detected from the phone number's prefix. If the customer has moved their number to another network, pass `channel` explicitly.
| Channel | Network | Prefixes |
| ----------------- | -------------- | ------------------ |
| `MPESA_TZ` | Vodacom M-Pesa | 074, 075, 076 |
| `AIRTEL_MONEY_TZ` | Airtel Money | 068, 069, 078 |
| `MIXX_BY_YAS` | Mixx by Yas | 065, 067, 071, 077 |
| `HALOPESA` | HaloPesa | 061, 062 |
| `TPESA` | T-Pesa | 073 |
## Amounts and fees [#amounts-and-fees]
* Amounts are whole Tanzanian shillings: `15000` is TZS 15,000. Minimum TZS 100, maximum TZS 5,000,000.
* The `fee` is calculated when the collection is created and never changes. It is deducted from what you receive: a TZS 15,000 collection with a TZS 300 fee adds TZS 14,700 to your balance.
* The API always reports the gross `amount` the customer paid, with the `fee` beside it. Your dashboard shows the other side of the same number — what reached your balance (TZS 14,700) — because that is what you can cash out. Each collection's page shows all three.
## Your reference [#your-reference]
`reference` is your own ID for the payment (for example an order number). It must be unique per mode: reusing one returns `409 duplicate_reference`, which protects you from charging the same order twice.
## Getting the result [#getting-the-result]
Use [webhooks](/docs/webhooks) (recommended) or poll `GET /v1/collections/{id}`. Don't rely on your customer's browser redirect or on the time elapsed: only `succeeded` means you were paid.
# Errors (/docs/errors)
Errors use standard HTTP status codes and one JSON shape:
```json
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone",
"message": "phone must be a valid Tanzanian mobile number",
"param": "phone",
"request_id": "req_01M3P44HNMABSHMWA98XWDH8XP"
}
}
```
* Branch on `code` (stable). `message` is for humans and may change.
* `param` names the field at fault, when there is one.
* Quote `request_id` (also in the `X-Request-Id` header) when contacting support.
| Status | `type` | Common codes |
| ------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400 | `invalid_request_error` | `invalid_phone`, `unsupported_currency`, `unsupported_channel`, `invalid_reference`, `invalid_metadata`, `invalid_json`, `idempotency_key_required`, `invalid_idempotency_key`, `invalid_limit` |
| 401 | `authentication_error` | `invalid_api_key`, `api_key_expired` |
| 403 | `permission_error` | `live_mode_not_enabled`, `merchant_suspended`, `ip_not_allowed` |
| 404 | `invalid_request_error` | `resource_not_found` |
| 409 | `invalid_request_error` | `duplicate_reference`, `idempotency_key_reused`, `idempotency_request_in_progress` |
| 422 | `invalid_request_error` | `amount_too_small`, `amount_too_large`, `unsupported_channel` (network not detected from the number) |
| 429 | `rate_limit_error` | `rate_limited` |
| 500 | `api_error` | `internal_error`: safe to retry with the same idempotency key |
A payment that is **declined** is not an HTTP error: the collection is returned normally with `status: "failed"` and a `failure_code`.
| `failure_code` | Meaning |
| ------------------------ | ------------------------------------------------------------- |
| `insufficient_funds` | Not enough money in the customer's wallet. |
| `customer_cancelled` | The customer rejected the PIN prompt. |
| `customer_timeout` | The customer did not respond in time. |
| `invalid_account` | The number cannot receive this payment. |
| `account_not_registered` | The number is not registered for this network's mobile money. |
| `limit_exceeded` | The amount exceeds a wallet or network limit. |
| `provider_rejected` | The network declined the payment. |
| `provider_unavailable` | The network was unavailable. |
# Going live (/docs/going-live)
1. **Handle every outcome.** Test success, `insufficient_funds`, `customer_cancelled`, `customer_timeout`, and `expired` with the [test numbers](/docs/testing).
2. **Verify webhook signatures** and deduplicate on the event `id` ([Webhooks](/docs/webhooks)).
3. **Send an `Idempotency-Key`** on every `POST` and retry timeouts with the same key.
4. **Keep your live key on your server only**, ideally restricted to your server's IPs.
5. **Get verified.** In the dashboard, complete **Settings → Business** and submit it for review. Once NuruPay approves your business, live mode unlocks: turn on two-factor authentication, switch the dashboard to live, then create your live key (`np_live_sk_…`) and live webhook endpoint (`https://` required).
6. **Make one small real payment** and confirm the `collection.succeeded` webhook reaches you.
7. **Know about the one-time fee.** Signing up and going live cost nothing. NuruPay's one-time onboarding fee is taken from your balance at your first cash out, in the dashboard under **Cash out**; after that, cash outs go straight through.
# Idempotency (/docs/idempotency)
Networks fail. If a request times out, you don't know whether NuruPay received it. Idempotency lets you retry safely.
Send an `Idempotency-Key` header on every `POST` (a UUID is ideal):
```
Idempotency-Key: 4f6c2b1e-8d0a-4c55-9e7b-3a2f1c0d9e8b
```
| You send | You get |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| A new key | The request is processed normally. |
| The same key and the same body | The **original** response, with header `Idempotent-Replayed: true`. Nothing is processed twice. |
| The same key with a different body | `409 idempotency_key_reused` |
| The same key while the first request is still running | `409 idempotency_request_in_progress`: retry in a moment |
| No key on a `POST` | `400 idempotency_key_required` |
* Keys are scoped to your account and mode, and remembered for **24 hours**.
* If the original request failed with a `5xx` or `429`, the key is released so your retry is processed normally.
* Keys are 1–255 printable ASCII characters.
Separately, your collection `reference` must be unique, which protects against double charges even if you generate a new idempotency key by mistake.
# Introduction (/docs)
NuruPay lets you charge customers on **M-Pesa, Airtel Money, Mixx by Yas, HaloPesa, and T-Pesa** with a single integration. You send one request; the customer approves a PIN prompt on their phone; NuruPay tells you the result by webhook.
## How a payment works [#how-a-payment-works]
1. Your server calls `POST /v1/collections` with the amount and the customer's phone number.
2. NuruPay sends a **USSD push**: the customer's phone shows a PIN prompt from their mobile-money network.
3. The customer enters their PIN. NuruPay confirms the payment with the network.
4. NuruPay sends your server a `collection.succeeded` webhook, and the money is added to your balance.
## Base URL [#base-url]
```
https://api.nurupay.io
```
Test and live mode share this URL; your API key decides which one you are in.
# Quickstart (/docs/quickstart)
You need a **test API key** (`np_test_sk_…`). [Create an account](https://nurupay.io/signup), then open **Developers → API keys** in the dashboard and create a test key. Test mode never moves real money.
## 1. Check your key [#1-check-your-key]
```bash
export NURUPAY_KEY=np_test_sk_...
curl https://api.nurupay.io/v1/whoami \
-H "Authorization: Bearer $NURUPAY_KEY"
```
```json
{"key_id":"key_…","merchant_id":"mer_…","mode":"test","object":"principal"}
```
## 2. Create a collection [#2-create-a-collection]
`0754123789` is a [test number](/docs/testing) that always succeeds.
```bash
curl https://api.nurupay.io/v1/collections \
-H "Authorization: Bearer $NURUPAY_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"amount": 1000, "phone": "0754123789", "reference": "quickstart-1"}'
```
The response is `202 Accepted` with `"status": "created"`. Copy the `id` (`col_…`).
Every `POST` needs an `Idempotency-Key`. If your request times out, retry with the **same** key: you get the original response instead of a duplicate charge. See [Idempotency](/docs/idempotency).
## 3. Watch it succeed [#3-watch-it-succeed]
In test mode the payment completes in about 10–20 seconds.
```bash
curl https://api.nurupay.io/v1/collections/col_... \
-H "Authorization: Bearer $NURUPAY_KEY"
```
```json
{"id":"col_…","object":"collection","status":"succeeded","amount":1000,"fee":0, "...": "..."}
```
## 4. Next steps [#4-next-steps]
* Receive results by [webhook](/docs/webhooks) instead of polling.
* Try the [failure numbers](/docs/testing) so your app handles declines and timeouts.
* Check [going live](/docs/going-live) when you are ready for real payments.
# Rate limits (/docs/rate-limits)
Each API key can make **50 requests per second**, with bursts of up to **100**. Exceeding it returns:
```
HTTP/1.1 429 Too Many Requests
Retry-After: 1
```
```json
{"error": {"type": "rate_limit_error", "code": "rate_limited", "message": "too many requests", "request_id": "req_…"}}
```
Wait for `Retry-After` seconds, then retry with the same `Idempotency-Key`. Use webhooks instead of polling to stay well under the limit.
# Test numbers (/docs/testing)
In test mode, the **last three digits** of the phone number decide the outcome. Use any valid Tanzanian prefix (for example `0754123` + the suffix).
| Phone ends in | Result | `failure_code` | Webhook |
| ----------------------- | -------------------------------------------------------------- | -------------------- | ---------------------- |
| any other (e.g. `…789`) | succeeded | — | `collection.succeeded` |
| `…001` | failed | `insufficient_funds` | `collection.failed` |
| `…002` | failed | `customer_cancelled` | `collection.failed` |
| `…003` | failed | `customer_timeout` | `collection.failed` |
| `…004` | succeeded, after an ambiguous network response | — | `collection.succeeded` |
| `…006` | failed immediately | `invalid_account` | `collection.failed` |
| `…005` | network unavailable: stays `created` until it expires (30 min) | `customer_timeout` | `collection.expired` |
Examples: `0754123789` succeeds, `0754123001` fails with insufficient funds, `0684123002` (Airtel) is cancelled by the customer.
Test mode runs the same code paths as live mode (validation, idempotency, fees, webhooks, balances), only the mobile-money network is simulated.
# Webhooks (/docs/webhooks)
NuruPay sends an HTTPS `POST` to your webhook endpoint when a collection reaches a final state. Add your endpoint in the dashboard under **Developers → Webhooks**; NuruPay shows its **signing secret** (`whsec_…`) once. Test and live mode have separate endpoints, and live endpoints must use `https://`.
## Events [#events]
| Event | When |
| ---------------------- | ------------------------------------------------------------------------------ |
| `collection.succeeded` | The customer paid. |
| `collection.failed` | Declined, insufficient funds, cancelled, or rejected; see `data.failure_code`. |
| `collection.expired` | Not approved in time; the order was cancelled. |
## Payload [#payload]
```json
{
"id": "evt_01M3P5FBS9V5FJ1P5R0N8Z64XX",
"type": "collection.succeeded",
"created_at": "2026-09-29T08:46:05Z",
"mode": "live",
"data": { "id": "col_…", "object": "collection", "status": "succeeded", "amount": 1000, "...": "..." }
}
```
`data` is the full collection object at the moment of the event.
## Verify the signature [#verify-the-signature]
Every webhook carries a `NuruPay-Signature` header:
```
NuruPay-Signature: t=1759132800,v1=c57e6ec5e76a0cdd68ee3fd1eba420ff9abf04cd9755d174d59e1c4d6e926a54
```
`v1` is the hex HMAC-SHA256 of `"."` using your signing secret. **Always verify it** before trusting the body, and reject timestamps older than five minutes to stop replays.
Verify against the **raw bytes** you received. Parsing the JSON and serialising it again changes the bytes and breaks the signature.
Node.js
Python
PHP
Go
```js
import crypto from 'node:crypto';
// Returns true only if the webhook is genuine and fresh.
// rawBody must be the exact bytes received (do not re-serialise JSON).
export function verifyNuruPaySignature(rawBody, header, secret, toleranceSeconds = 300, now = Date.now()) {
const parts = Object.fromEntries(header.split(',').map((p) => p.trim().split('=', 2)));
const t = Number(parts.t);
if (!Number.isInteger(t) || !parts.v1) return false;
if (Math.abs(now / 1000 - t) > toleranceSeconds) return false;
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const a = Buffer.from(expected, 'hex');
const b = Buffer.from(parts.v1, 'hex');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
```
```python
import hashlib
import hmac
import time
from typing import Optional
def verify_nurupay_signature(raw_body: bytes, header: str, secret: str, tolerance_seconds: int = 300, now: Optional[float] = None) -> bool:
"""True only if the webhook is genuine and fresh. raw_body: the exact bytes received."""
parts = dict(p.strip().split("=", 1) for p in header.split(",") if "=" in p)
try:
t = int(parts["t"])
sig = parts["v1"]
except (KeyError, ValueError):
return False
if abs((now if now is not None else time.time()) - t) > tolerance_seconds:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, sig)
```
```php
$toleranceSeconds) return false;
$expected = hash_hmac('sha256', $t . '.' . $rawBody, $secret);
return hash_equals($expected, $parts['v1']);
}
```
```go
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"math"
"strconv"
"strings"
"time"
)
// VerifyNuruPaySignature reports whether a webhook is genuine and fresh.
// rawBody must be the exact bytes received.
func VerifyNuruPaySignature(rawBody []byte, header, secret string, tolerance time.Duration, now time.Time) bool {
var ts, sig string
for _, p := range strings.Split(header, ",") {
k, v, _ := strings.Cut(strings.TrimSpace(p), "=")
switch k {
case "t":
ts = v
case "v1":
sig = v
}
}
t, err := strconv.ParseInt(ts, 10, 64)
if err != nil || sig == "" || math.Abs(now.Sub(time.Unix(t, 0)).Seconds()) > tolerance.Seconds() {
return false
}
m := hmac.New(sha256.New, []byte(secret))
m.Write([]byte(ts + "."))
m.Write(rawBody)
return hmac.Equal([]byte(hex.EncodeToString(m.Sum(nil))), []byte(sig))
}
```
## Respond quickly [#respond-quickly]
* Return any `2xx` within **10 seconds**, then do slow work (sending emails, updating stock) in the background.
* Anything else, including timeouts and redirects, counts as a failure. NuruPay retries after **1m, 5m, 30m, 2h, 6h, and 12h**, then marks the delivery failed.
* An endpoint that fails continuously for three days is disabled; NuruPay re-enables it once you have fixed it.
## Handle duplicates and ordering [#handle-duplicates-and-ordering]
* Delivery is **at least once**: you may receive the same event twice. Store the event `id` and ignore repeats.
* Events can arrive **out of order**. If order matters, fetch the collection with `GET /v1/collections/{id}` for its current state.
* To double-check an event, fetch it with `GET /v1/events/{id}` using your API key.
## Endpoint requirements [#endpoint-requirements]
* Live-mode endpoints must use `https://`.
* Endpoints must be publicly reachable; private and internal addresses are refused.