API documentation

Your server asks a question, the person answers with one tap on their phone, your server receives the answer. No SMS to pay for, no code to copy: a REST API, JSON, one key.

Try it live

Send a request, watch it arrive.

Edit the request, send it, answer on the phone. The API response and the webhook show up as you go.

1

The request

What the person will see on their phone.

ActionactionPick a common action, or your own.
Answer modemodeHow the person answers.
Number matchingnumber_matchingThe person taps the number shown on your page.
2

The code

It follows your changes. Replace sk_test_… with your test key.

3

Send

Response

The API response shows here.

Hello, awa.diallo

Activity

Today

4

The person’s answer

Answer on the demo phone.

Contents
  1. Live try
  2. How it works
  3. Five-step quickstart
  4. Authentication
  5. Create a request
  6. Known actions
  7. Payment received
  8. Approval or code
  9. Number matching
  10. On the same phone
  11. Statuses
  12. The request object
  13. The signed proof
  14. Collect without an aggregator
  15. Create a payment
  16. Payment statuses
  17. The co-signed receipt
  18. Refund
  19. Add a point of sale
  20. Follow a point of sale
  21. Maisons (sub-merchants)
  22. Merchants’ questions
  23. Cards
  24. Receipts
  25. Invoices
  26. Quotes
  27. Subscriptions
  28. Plans
  29. Subscribe a person
  30. The lifecycle
  31. Variable amount
  32. Tickets
  33. Try a ticket
  34. Updating a ticket
  35. Verifying a ticket
  36. Answering a verification
  37. The lifecycle
  38. eNotif Transport
  39. Try a bus ticket
  40. The API for platforms
  41. Guaranteed contact
  42. Try a contact
  43. Statuses and webhooks
  44. WhatsApp on your items
  45. The network, simply
  46. Continue with eNotif
  47. Link a screen
  48. Network Directory
  49. No migration
  50. Make two platforms talk
  51. Proven delivery
  52. Every route, to try
  53. Send a message
  54. Talking with the person
  55. Webhooks, simply
  56. An organisation’s events
  57. Check the signature
  58. If your server does not answer
  59. No public server?
  60. Idempotency
  61. Test mode and testers
  62. Errors
  63. Anti-abuse limits

How it works

Four steps, always the same. You only code two of them: the call at the start (1) and receiving the answer (4).

  1. 1POST /v1/requestsYou ask the question.
  2. 2NotificationThe request shows up, with your application’s name.
  3. 3ApproveThe person taps the button; their phone signs the answer.
  4. 4WebhookWe call your server: request.approved.
Your server → eNotif → the phone → eNotif → your server (the webhook).

Between 1 and 4, your page simply says “Confirm on your phone”. When the webhook arrives, you do what the answer allows: sign the person in, confirm the payment, change the password…

Five-step quickstart

Allow five minutes. At the end, your server will have received its first answer.

  1. Create an account with eNotifYour number, one request approved on your phone: no password to remember. E-mail and password remain possible. Test mode is open straight away; live mode opens once our team has accepted your account.
  2. Create an applicationIts name and logo are what the person will see on their phone. Copy the test key (it starts with sk_test_): it is shown only once.
  3. Invite your own phoneIn Testers, invite your eNotif @handle, then accept the invitation in the app (Profile › Tests). Without this step, your test requests are simulated: nothing rings.
  4. Tell us where to send the answersIn Webhooks, paste your server’s address, for example https://your-site.com/enotif/webhook. Keep the whsec_… secret: it proves the call really comes from us. No server online yet? Here is what to do.
  5. Send your first requestWith the command below, or straight from the reference. Tap “Approve” on your phone: the answer reaches your server.
First request
curl https://enotif.sahelab.com/v1/requests \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "+22370000001", "action": "login", "title": "Sign in to Sahel Market" }'

Authentication

Your secret key proves the call comes from you. It goes in the Authorization header of every call, and it decides the mode:

The key starts withModeAvailable
sk_test_Test mode (livemode: false). Only your testers receive the requests.As soon as you sign up
sk_live_Live mode (livemode: true).Once your account is accepted

A key is shown only once, when it is created: we keep only a fingerprint and its last 4 characters. It stays on your server, never in a mobile app or a web page. A leaked key is revoked in the console, with immediate effect.

Test your key — GET /v1/ping
curl https://enotif.sahelab.com/v1/ping -H "Authorization: Bearer sk_test_…"

# { "object": "ping", "livemode": false, "application": { "id": "app_…", "name": "Sahel Market" } }

Answers are JSON, in snake_case. Dates are Unix timestamps in seconds; phone numbers use the international E.164 format (+22370000001).

Try it here GET/v1/ping

Request

Create a request

A request is the question you ask the person: a title, a sentence of context if needed, and a few lines of information (amount, browser…). It shows on their phone with your application’s name and logo.

FieldTypeDescription
phone or userE.164 / usr_…The recipient: their number, or the usr_… id you already received for them. One of the two, not both.
actionrequiredcodeWhat it is about: login, transaction… Lowercase letters, digits and _, 2 to 40 characters. See the known actions.
titlerequiredtext2 to 60 characters. What is asked: “Sign in to Sahel Market”.
messagetextA sentence of context, 280 characters at most.
contextlist6 rows at most, { "label": ≤ 24, "value": ≤ 80 }, shown as they are: browser, device, amount…
amountobjectAn amount, shown big on the phone: { "value": "25000", "currency": "XOF" }. value is a number written as text (15 digits at most, 2 decimals at most; an integer is accepted), currency a 3-letter ISO 4217 currency code. The person approves this sum, and it is part of the proof.
modeapproval | codeHow the person answers: a button (approval, the default) or a code. See approval or code.
number_matchingbooleanNumber matching. Default false; approval mode only.
expires_insecondsThe time to answer: 30 to 900, 300 by default (5 minutes).
metadataobjectYour own references (20 keys at most, values of 500 characters at most). Never shown to the person, returned as they are in the object and the webhooks.
localefr | enThe notification’s language.
POST /v1/requests
curl https://enotif.sahelab.com/v1/requests \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 8f14e45f-ceea-467f-a8f6-0a3b1d2c9e71" \
  -d '{
    "phone": "+22370000001",
    "action": "login",
    "title": "Sign in to Sahel Market",
    "message": "A sign-in is requested.",
    "context": [
      { "label": "Browser", "value": "Firefox" },
      { "label": "Device", "value": "Linux" }
    ],
    "number_matching": true,
    "metadata": { "session": "abc" }
  }'

Response 201: the request object, with its id. If the person cannot be reached, the response is also 201, with status: "failed": not an error, a piece of information your code reads.

Keep SMS as a fallback. failure_reason: "not_registered" means this number has no eNotif: send your usual SMS. Do the same for no_trusted_device and recipient_unavailable.

Try it here POST/v1/requests

ActionactionPick a common action, or your own.
Answer modemodeHow the person answers.
Number matchingnumber_matchingThe person taps the number shown on your page.
Request
The phone on the right answers.The phone below answers.

Known actions

The action field says what the request is about. For the twelve actions below, the app shows a label (icon and name) and the right question above your title. Any other code is accepted and simply shows as “Request”.

CodeLabel in the appQuestion on the phoneButtons
login Sign-in“Is it you?”Yes, it’s meNo, it’s not me
device_login New device“Is it you?”Yes, it’s meNo, it’s not me
password_reset Password“Is it you changing your password?”Yes, it’s meNo, it’s not me
transaction Payment“Do you confirm this payment?”Yes, I confirmNo, I refuse
payment_received Payment received“Did you receive this payment?”Yes, I received itNo, nothing received
transfer Money transfer“Do you confirm this transfer?”Yes, I confirmNo, I refuse
withdrawal Withdrawal“Do you confirm this withdrawal?”Yes, I confirmNo, I refuse
payout_account_change Payout account“Do you confirm this change?”Yes, I confirmNo, I refuse
phone_change Number change“Do you confirm this change?”Yes, I confirmNo, I refuse
email_change E-mail change“Do you confirm this change?”Yes, I confirmNo, I refuse
account_delete Account deletion“Delete your account?”Yes, deleteNo, keep my account
delivery_confirm Delivery“Did you receive your parcel?”Yes, I got my parcelNo, not received
document_sign Signature“Do you sign this document?”Yes, I signNo
any other code Request“Is it you?”Yes, it’s meNo, it’s not me

In code mode, no question is asked: the app shows the label, your title and the code.

Confirm a payment received (no aggregator)

Your customer pays by Mobile Money or in cash, straight to the seller. Rather than trusting a screenshot, you ask the seller, on their phone: “Did you receive this payment?”

  1. The customer says they paidOn your site or your app: “I paid 25,000 FCFA by Orange Money, reference OM-7781.”
  2. You ask the sellerPOST /v1/requests to the seller’s number, with "action": "payment_received" and the amount. Their phone shows the sum, big.
  3. The seller checks, then answersThey look at their Mobile Money balance (or their till) and tap “Approve”. If nothing came in, they tap “Deny”.
  4. You release the order and keep the receiptOn the request.approved webhook, the order goes out. GET /v1/requests/{id}/proof gives you the receipt signed by the seller’s phone: keep it in case of a dispute.
Ask the seller
curl https://enotif.sahelab.com/v1/requests \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22376000101",
    "action": "payment_received",
    "title": "Payment received?",
    "message": "Awa Traoré says she paid you for order 2291.",
    "context": [
      { "label": "Method", "value": "Orange Money" },
      { "label": "Reference", "value": "OM-7781" }
    ],
    "amount": { "value": "25000", "currency": "XOF" },
    "metadata": { "order": "2291" }
  }'

The money never goes through eNotif: we only collect, signed, the confirmation of the one who received it.

Simpler: POST /v1/payments does all this for you — the payer pays from eNotif, the seller confirms, you receive payment.succeeded.

Try it here POST/v1/requests

ActionactionPick a common action, or your own.
Answer modemodeHow the person answers.
Number matchingnumber_matchingThe person taps the number shown on your page.
Request
The phone on the right answers.The phone below answers.

Approval or code

Two ways to answer: tap a button, or copy a code. You choose for each request; either way, the answer arrives as a webhook.

Approval (approval): Approve or Deny

The default, and the right choice in most cases. The person taps Approve or Deny; their phone signs the answer. The “It’s not me” button denies and reports the attempt to us (denial: "reported").

Code (code): 6 digits to copy

When the person has to type something on your side, for example on another device. We create the code, the app shows it, the person types it on your page, your server asks us whether it is right. The code is never sent to you.

1. YouPOST /v1/requests with "mode": "code"
2. The personopens the request in eNotif, reads “482 913”, types it on your page
3. YouPOST /v1/requests/{id}/verify with { "code": "482913" }
POST /v1/requests/{id}/verify
curl https://enotif.sahelab.com/v1/requests/req_7Hq2kLmN3pQrS8tUvWx1Yz/verify \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "code": "482913" }'
  • Right code: 200, the request becomes approved.
  • Wrong code: 422 code_invalid, with attempts_remaining. After 5 attempts, the request becomes denied (denial: "code_attempts").
  • The code has not been shown on the phone yet: 409 code_not_revealed. A request in approval mode: 409 request_not_code_mode.

Try it here POST/v1/requests

ActionactionPick a common action, or your own.
Answer modemodeHow the person answers.
Number matchingnumber_matchingThe person taps the number shown on your page.
Request
The phone on the right answers.The phone below answers.

On the same phone

Your mobile app, or your site opened on the phone, and eNotif are on the same device. The person taps “Confirm with eNotif”, eNotif opens on the request, they approve (signed), and come straight back to you. No number to copy between two screens: there is only one.

  1. Register your return addressConsole › Settings › Back to your app: your app’s scheme (sahelmarket://enotif), its universal link, or an https page of your site. http is never accepted.
  2. Your server creates the request with return_urlIt must start with a registered address (else 422 return_url_not_allowed). The answer carries links.app (enotif://r/req_…) and links.universal (https://enotif.sahelab.com/r/req_…).
  3. Your app opens eNotifOpen links.universal: the eNotif app takes it when installed (Android App Links, iOS universal links), otherwise the web app opens on the same request.
  4. The person approves, eNotif sends them backTo return_url?status=approved&request=req_… (or status=denied). The address comes from your server, never from the link that opened eNotif.
  5. Trust the webhook, not the linkThe return reopens the right screen; the proof stays request.approved, signed, received by your server (or GET /v1/requests/{id}).
curl https://enotif.sahelab.com/v1/requests \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000001",
    "action": "transaction",
    "title": "Paiement de 25 000 FCFA",
    "return_url": "sahelmarket://enotif/done"
  }'
# → { "id": "req_…", …, "links": { "app": "enotif://r/req_…", "universal": "https://enotif.sahelab.com/r/req_…" } }

Continue with eNotif from an app

Nothing special to code: open eNotif’s https link (/oauth/authorize…, or a pending action’s /go/…) like any link. Android hands it to the installed eNotif app (verified App Link) or to the installed web app; otherwise it opens in the browser.

  • A sign-in: eNotif’s page stays in the tab and waits; the person taps “Yes, it’s me” in eNotif, which goes straight back to the previous app; the tab sees the answer and goes on by itself to your redirect_uri with code and state. No new tab, your PKCE intact.
  • A pending action: eNotif opens on the card, one tap, then back to the previous app; your page shows the status from your webhooks.
  • Return targets are the ones you declared (Connect redirect URIs, “Return to your app” in the console, allowed domains). An unknown one is refused.
Kotlin (Android)
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(authorizeUrl)))
React Native / Capacitor
await Linking.openURL(authorizeUrl)   // React Native
window.location.assign(authorizeUrl)  // Capacitor or a web app

Number matching

One more protection against fake pages: the person must find on their phone the number your page shows.

Why? Someone who stole a password can trigger a request and hope the person taps “Approve” out of habit. With number matching, they have to look at your page: the attacker cannot show them the right number.

  1. Send the request with "number_matching": true.
  2. The response holds a two-digit number: show it on your page (“Tap 47 on your phone”).
  3. The app offers three numbers; the person taps the right one.
In the response
"number_matching": { "number": 47 }

A wrong number denies the request and reports it: it is the sign that another page triggered it. Number matching only works in approval mode.

Statuses

A request starts out waiting (pending) and changes state only once.

StatusWhat it means
pendingSent; the person has not answered yet.
approvedApproved (signed by the phone), or code verified.
deniedDenied. denial says how: user (“Deny”), reported (“It’s not me”), code_attempts (too many wrong codes).
expiredNo answer in time (expires_at). It can no longer be approved.
cancelledCancelled by you: POST /v1/requests/{id}/cancel.
failedImpossible from the start. failure_reason: not_registered, no_trusted_device, recipient_unavailable.

The request object (request)

This is what the API returns for every request, and what every request.* webhook carries.

request
{
  "id": "req_7Hq2kLmN3pQrS8tUvWx1Yz",
  "object": "request",
  "livemode": false,
  "user": "usr_Q4mZ9xK2pL7nR1sT8vWy2A",
  "phone": "+22370000001",
  "action": "login",
  "mode": "approval",
  "title": "Sign in to Sahel Market",
  "message": "A sign-in is requested.",
  "context": [
    { "label": "Browser", "value": "Firefox" },
    { "label": "Device", "value": "Linux" }
  ],
  "amount": null,
  "number_matching": { "number": 47 },
  "metadata": { "session": "abc" },
  "status": "pending",
  "failure_reason": null,
  "denial": null,
  "delivered_at": null,
  "decided_at": null,
  "expires_at": 1791371100,
  "created_at": 1791370800,
  "simulated": false
}
  • user: the person’s id for your application only; two applications never receive the same one. null if the person is not on eNotif.
  • phone: the number as you sent it, in E.164; null if you wrote to a user.
  • delivered_at: the person opened the request. decided_at: they answered.
  • In test mode only: simulated, and simulation_reason when nothing rang (not_on_enotif or not_a_tester).

Try it here GET/v1/requests/{id}

Request
The phone on the right answers.The phone below answers.

The signed proof

Once the request is decided, you can get its receipt: what the person saw, what they answered, and their phone’s signature. This receipt can be checked without us, with the phone’s public key.

GET /v1/requests/{id}/proof
{
  "object": "proof",
  "request": { "id": "req_7Hq2kLmN3pQrS8tUvWx1Yz", "object": "request", "status": "approved", … },
  "decision": "approve",
  "content_hash": "9f2c…e41a",
  "content_hash_matches": true,
  "statement": "enotif:v1:approve:req_7Hq2kLmN3pQrS8tUvWx1Yz:Xk3…q9:dev_…",
  "signature": "q3V0Lw…8wQ",
  "signature_format": "raw r||s, base64url",
  "algorithm": "ES256",
  "device": "dev_…",
  "public_key": "BHq…Zw",
  "public_key_format": "uncompressed P-256 point, base64url",
  "key_fingerprint": "3F2A-91C0",
  "signed_at": 1791370812
}
FieldWhat it is
decisionThe signed answer: approve, deny or report (“It’s not me”).
statementThe exact text the phone signed: enotif:v1:{answer}:{req_id}:{challenge}:{dev_id}.
signatureThe phone’s signature (ECDSA P-256 / SHA-256, that is ES256), r||s in base64url.
public_keyThe phone’s public key (uncompressed P-256 point, base64url). key_fingerprint is its short fingerprint, the one the person sees in the app.
content_hashThe SHA-256 fingerprint of what the person saw (title, message, context, amount). content_hash_matches is true if the request has not changed since.
signed_atWhen it was signed.

Response 404 while the request is waiting, and when no signature exists: an expired, cancelled, or simulated (test mode) request.

Check a proof without eNotif

The signature covers statement, byte for byte. Check it with the public key, then make sure statement is about your request and the right answer:

<?php
// $proof: the JSON of GET /v1/requests/{id}/proof, decoded.
function b64url(string $s): string { return base64_decode(strtr($s, '-_', '+/')); }

// The phone's key: an uncompressed P-256 point (65 bytes) → a PEM public key.
$spki = hex2bin('3059301306072a8648ce3d020106082a8648ce3d030107034200') . b64url($proof['public_key']);
$pem  = "-----BEGIN PUBLIC KEY-----\n" . chunk_split(base64_encode($spki), 64, "\n") . "-----END PUBLIC KEY-----\n";

// The signature: raw r||s (64 bytes) → DER, which openssl_verify expects.
$raw = b64url($proof['signature']);
$int = function (string $i): string {
    $i = ltrim($i, "\0");
    if ($i === '' || ord($i[0]) > 0x7F) $i = "\0" . $i;
    return "\x02" . chr(strlen($i)) . $i;
};
$seq = $int(substr($raw, 0, 32)) . $int(substr($raw, 32, 32));
$der = "\x30" . chr(strlen($seq)) . $seq;

$signed = openssl_verify($proof['statement'], $der, $pem, OPENSSL_ALGO_SHA256) === 1;

// The statement must be about YOUR request and say the right answer.
[, , $verb, $requestId] = explode(':', $proof['statement']);
$valid = $signed && $requestId === $proof['request']['id'] && $verb === $proof['decision'];
import crypto from 'node:crypto';

// proof: the JSON of GET /v1/requests/{id}/proof.
const spki = Buffer.concat([
  Buffer.from('3059301306072a8648ce3d020106082a8648ce3d030107034200', 'hex'),
  Buffer.from(proof.public_key, 'base64url'), // uncompressed P-256 point
]);
const key = crypto.createPublicKey({ key: spki, format: 'der', type: 'spki' });

const signed = crypto.verify(
  'sha256',
  Buffer.from(proof.statement),
  { key, dsaEncoding: 'ieee-p1363' }, // the signature is raw r||s
  Buffer.from(proof.signature, 'base64url'),
);

// The statement must be about YOUR request and say the right answer.
const [, , verb, requestId] = proof.statement.split(':');
const valid = signed && requestId === proof.request.id && verb === proof.decision;

Try it here GET/v1/requests/{id}/proof

Request
The phone on the right answers.The phone below answers.

Collect without an aggregator

Your customer pays you directly: by Mobile Money to your number, or in cash at a point of sale (a shop that collects for you). The money never goes through eNotif. We only carry each side’s word, signed by their phone: “I have paid”, “I received it”, “I handed the money”. When both sides agree, you receive payment.succeeded and a co-signed receipt.

No SMS reading, no “adjusted” amount to recognise a payment, no merchant account to open with an operator.

By Mobile Money

  1. 1POST /v1/payments25,000 FCFA, ref. CMD-2291
  2. 2“25,000 FCFA to pay”on the payer’s phone
  3. 3“I have paid”, signedafter the USSD code on the keypad
  4. 4“Did you receive it?”on the seller’s phone
  5. 5“Yes”, signedthe seller checked their balance
  6. 6payment.succeededthe signed webhook
The payer says they paid, the seller confirms: each on their own phone.
  1. The payer picks their operatorIf the app knows theirs (confirmed once, kept in their profile), one button: “Pay with Orange Money”. Otherwise, the list of your operators.
  2. Their keypad opens with the code readyThe operator’s USSD transfer code, with your number and the amount. They press call and type their Mobile Money PIN, as usual. On an iPhone or in a browser, they copy the code.
  3. They tap “I have paid”The payment becomes declared (webhook payment.declared). Or “Later”: it waits in their Activity.
  4. The seller confirmsThe number that receives the money (collector, or by default the eNotif number linked to your account) sees “Did you receive 25,000 FCFA from Awa?” with the operator and the reference. Yes → succeeded. No → failed. No answer in 15 minutes → expired.

In cash at a point of sale

  1. 1POST /v1/payments"cash": true
  2. 2A 6-digit codeon the payer’s phone
  3. 3“I received 25,000 FCFA”, signedthe point of sale typed the code
  4. 4“Did you hand it over?”on the payer’s phone
  5. 5“Yes”, signedthe payer confirms
  6. 6payment.succeededmethod: cash, point_of_sale
The point of sale says they received, the payer says they handed it: both signatures make the receipt.

You invite your points of sale from the console (Points of sale) or through the API (Add a point of sale): a name, the merchant’s eNotif number, a daily ceiling, the settlement rhythm and, for information, a commission. The merchant receives “… invites you to become its point of sale” on their phone: their signed “Yes, I accept” is the co-signed agreement. Only active points of sale see “Collect cash” in the app; either side can end the agreement. Beyond the ceiling, “I received” is refused: the money stays with the payer.

The console keeps the budget: collected by Mobile Money, collected in cash, held by each point of sale, settled. A settlement you record (“they handed me 150,000 FCFA”) is confirmed by the merchant on their phone, signed: it counts as settled once confirmed.

Your account’s plan sets the number of points of sale and cash collection in live mode. Without cash in the plan, POST /v1/payments with methods.cash answers 402 feature_unavailable; payments have their own monthly quota (402 quota_exceeded, metric: payments). The sandbox is never blocked.

Create a payment

POST /v1/payments
curl https://enotif.sahelab.com/v1/payments \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000001",
    "amount": { "value": "25000", "currency": "XOF" },
    "reference": "CMD-2291",
    "description": "Order 2291 — 2 bags of rice",
    "methods": {
      "mobile_money": [
        { "operator": "orange_money", "number": "+22376000000" },
        { "operator": "moov_money", "number": "+22366000000" }
      ],
      "cash": true
    }
  }'
FieldWhat it is
phone or userrequiredThe payer: their E.164 number, or their usr_… for your application.
amountrequired{ "value": "25000", "currency": "XOF" } — a decimal string, never a float. No decimals in FCFA.
referencerequiredYour reference, 40 characters at most. Shown to the payer and the seller.
descriptionoptionalWhat is paid for, 280 characters at most.
methods.mobile_moneyUp to 6 accounts { operator, number }: the operator (see below) and the number that receives the money.
methods.cashtrue to offer cash at a point of sale. At least one method is required.
point_of_saleoptionalA point of sale (ptn_…) with Mobile Money numbers (accounts): paid on its numbers, confirmed on its phone, within its daily ceiling. No number: point_of_sale_no_numbers.
merchantoptionalOne of your maisons (mai_…): paid on its own numbers (unless methods.mobile_money gives some), confirmed on its phone (unless collector), within its daily ceiling (422 merchant_ceiling_reached). Only once accepted (merchant_inactive).
collectorsoptionalThe team that confirms: 1 to 5 eNotif numbers (your cashiers). All receive “Did you receive…?”; the first answer counts, the other questions disappear.
confirmation_windowoptionalThe time the team has to confirm, in seconds: from 900 (15 min, default) to 86400 (24 h). Beyond: awaiting_confirmation, never expired.
collectoroptionalThe eNotif number that confirms Mobile Money receipt. Default: the one set in the console, else the number linked to your account.
expires_inoptionalSeconds before it expires if nobody pays: 300 to 604800 (7 days), 3600 by default.
metadataoptionalUp to 20 keys, never shown, returned in the webhooks.

Answer 201: the payment object. An unreachable payer gives 201 with "status": "failed" and failure_reason (not_registered, no_trusted_device, recipient_unavailable), as for a request.

Operators

The operator code must exist in the country of the receiving number. The app guesses the payer’s operator from their number’s prefix; they confirm it once.

CodeOperatorPrefixesUSSD code
orange_moneyOrange Money · CIto be checked+225 07#144*1*{number}*{amount}#
mtn_momoMTN MoMo · CIto be checked+225 05*133*1*1*{number}*{amount}#
moov_moneyMoov Money · CIto be checked+225 01*155*1*1*{number}*{amount}#
waveWave · CIto be checked—no code: the number is copied opens the app: wave://
orange_moneyOrange Money · ML+223 7, 8*144*2*1*{number}*{amount}#
moov_moneyMoov Money · ML+223 6, 9*555*2*1*{number}*{amount}#
waveWave · SN—no code: the number is copied
orange_moneyOrange Money · SN+221 77, 78*144*1*{number}*{amount}#
floozFlooz · TGto be checked+228 96, 97, 98, 99, 79*155*1*1*{number}*{amount}#
tmoneyT-Money · TGto be checked+228 90, 91, 92, 93, 70, 71*145*1*{amount}*{number}#

Try it here POST/v1/payments

AmountamountA string, no decimals in FCFA.
Mobile Moneymethods.mobile_moneyThe operators you accept and the number that receives.
Cashmethods.cashOffer cash at a point of sale.
Request
The phone on the right answers.The phone below answers.

Payment statuses

StatusWhat happened
pendingNobody has paid yet. You can cancel (POST /v1/payments/{id}/cancel).
declaredThe payer signed “I have paid” (Mobile Money), or the point of sale “I received” (cash). The other side must confirm.
awaiting_confirmationMobile Money: “I have paid” is signed, but nobody of the team answered within the window. The payment does not expire (money may have left): the team is reminded every 6 h (3 times), and a late answer settles it. Webhook payment.awaiting_confirmation.
succeededBoth sides agree. method says how, operator or point_of_sale through whom.
failedcollector_denied (the seller received nothing), payer_denied (the payer says they did not hand the money), collector_unavailable, or unreachable at creation.
expiredNobody paid in time, or receipt was not confirmed within 15 minutes.
cancelledYou cancelled before any payment.

Each change sends a webhook: payment.declared, payment.awaiting_confirmation, payment.succeeded, payment.failed, payment.expired, payment.cancelled — same signature, same retries as requests. Tick them in the console, Webhooks.

The seller’s confirmation is an ordinary request ("action": "payment_received"): you also see it in Requests, its id in confirmation_request.

Refund

A succeeded payment is refunded declared by both sides: POST /v1/payments/{id}/refunds (all that remains by default, or amount, and an optional reason). Whoever received the money — the maison, else the collector — reads “Did you refund 25,000 FCFA to Awa?” with the customer’s number and signs Yes, I refunded; then the customer signs Yes, I received it. Both signed answers are the proof, and a credit note lands in the customer’s Vault. eNotif does not move money.

POST /v1/payments/{id}/refunds
curl https://enotif.sahelab.com/v1/payments/pay_…/refunds \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "amount": { "value": "10000", "currency": "XOF" }, "reason": "Missing item" }'
StatusWhat it means
askedWhoever was paid must confirm sending the money back (24 h).
sentThey signed it; the customer must confirm receiving it (24 h).
succeededBoth signed; credit_note is the credit note (rcp_…). The payment shows amount_refunded.
disputedThe customer says nothing arrived.
cancelled · expiredThe sender said no, or did not answer: the amount can be refunded again.
unconfirmedSent, but the customer did not answer.

GET /v1/payments/{id}/refunds lists them; GET /v1/payments/{id}/refunds/{rfd_…} gives one with proof.sender and proof.payer. Webhooks refund.created, refund.sent, refund.succeeded, refund.disputed, refund.cancelled, refund.expired, refund.unconfirmed. Beyond what remains: 422 refund_too_large. The console has Refund on every succeeded payment.

The co-signed receipt

GET /v1/payments/{id}/proof, for a succeeded payment: two ECDSA P-256 signatures, each by a trusted phone, each verifiable with OpenSSL alone (same method as a request’s proof).

GET /v1/payments/pay_…/proof
{
  "object": "payment_proof",
  "payment": { "id": "pay_5Tq8LmZ2xK7pR1nW4sYc9B", "status": "succeeded", "method": "mobile_money", … },
  "content_hash": "9f2c…",
  "algorithm": "ES256",
  "signatures": [
    { "role": "payer", "verb": "paid",
      "statement": "enotif:v1:paid:pay_5Tq8…:Xk2…:dev_…",
      "signature": "…", "public_key": "BH3…", "content_hash_matches": true },
    { "role": "collector", "verb": "approve", "request": "req_…",
      "statement": "enotif:v1:approve:req_…:…:dev_…",
      "signature": "…", "public_key": "BFa…", "content_hash_matches": true }
  ]
}

In cash, the two roles are partner — the point of sale (cash-received) and payer (cash-given). A simulated payment has no signature: 404.

In test mode, a payment to a number that is not a tester is simulated: settle it with POST /v1/sandbox/payments/{id}/succeed or /fail, or from the console.

Add a point of sale

A point of sale is a shop that takes your customers’ cash. The merchant is a person on eNotif: you invite them with your terms, they accept on their phone, and they see “Collect” in their app.

  1. 1POST /v1/points-of-salenumber, name, ceiling, settlement
  2. 2“Sahel Market invites you…”with your terms
  3. 3“Yes, I accept”, signedthe co-signed agreement
  4. 4point_of_sale.acceptedthe signed webhook
You invite, the merchant accepts on their phone: the agreement is signed by both sides.
  1. The merchant installs eNotifOn their phone, with their number. For your tests, first add them as a tester in the console (Testers): in test mode, only a tester receives the invitation.
  2. Your server invites themPOST /v1/points-of-sale with their number, the point of sale’s name, the daily ceiling and the settlement rhythm. Answer 201, "status": "invited".
  3. They accept on their phoneThey see your terms and tap “Yes, I accept”: their signed answer is the agreement. You receive point_of_sale.accepted (or point_of_sale.declined).
  4. They collectYour payments with methods.cash reach their “Collect”. Beyond the day’s ceiling, “I received” is refused: the money stays with the payer.
  5. You follow, and end it if neededGET /v1/points-of-sale tells what each one holds. POST /v1/points-of-sale/{id}/end ends the agreement; what is held is still owed.
POST /v1/points-of-sale
curl https://enotif.sahelab.com/v1/points-of-sale \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000051",
    "label": "Boutique Kanté, Badalabougou",
    "daily_ceiling": 50000,
    "settlement_rhythm": "weekly"
  }'
FieldWhat it is
phonerequiredThe merchant’s eNotif number, E.164. Not on eNotif: 422 partner_not_on_enotif.
labelrequiredThe point of sale’s name, 2 to 60 characters. Shown to the payer.
daily_ceilingrequiredWhat they may collect per day for you, in units of the currency (FCFA: the francs).
settlement_rhythmoptionaldaily, weekly (default) or monthly: when they hand the money over.
currencyoptionalXOF by default.
accountsoptionalIts Mobile Money numbers { operator, number } (up to 6): a payment with "point_of_sale": "ptn_…" is then paid to it by Mobile Money, confirmed on its phone, counted in what it holds for you and in its daily ceiling.
commission_bpsoptionalAn informative commission, in basis points (2.5 % = 250). eNotif never takes it.

A person is a point of sale once per application (422 partner_exists). Your account’s plan sets how many points of sale you have in production.

Try it here POST/v1/points-of-sale

Settlementsettlement_rhythmWhen the merchant hands the money over to you.
Request
The phone on the right answers.The phone below answers.

Follow and end

CallWhat it does
GET /v1/points-of-saleYour points of sale, newest first. ?status=active for one status.
GET /v1/points-of-sale/{id}One point of sale: agreement, terms, collected, settled, held, room left today.
POST /v1/points-of-sale/{id}/endEnds the agreement (reason optional, 200 characters). They no longer collect; the merchant is told.
point_of_sale
{
  "id": "ptn_8Kd2mQ7xL4pR1nW9sYc3Bv",
  "object": "point_of_sale",
  "label": "Boutique Kanté, Badalabougou",
  "phone": "+22370000051",
  "status": "active",
  "currency": "XOF",
  "daily_ceiling": 50000,
  "settlement_rhythm": "weekly",
  "taken_today": 25000,
  "remaining_today": 25000,
  "collected": 125000,
  "settled": 100000,
  "held": 25000,
  "accepted_at": 1791370812,
  "livemode": false
}
StatusWhat happened
invitedThe invitation awaits an answer.
activeThey accepted: they collect.
declinedThey refused.
expiredThey did not answer in time. Invite them again from the console.
endedOne side ended the agreement (ended_by: developer or merchant).

Webhooks, to tick in the console (Webhooks): point_of_sale.accepted, point_of_sale.declined, point_of_sale.ended. data.object is the point_of_sale object. They go to the invitation’s environment (test or live).

Maisons (sub-merchants)

A maison is a merchant of your platform — a restaurant of your delivery service — that its customers pay directly, on its merchant numbers. You invite it by its eNotif number with your conditions; it reads and accepts them once on its phone; then each POST /v1/payments with "merchant": "mai_…" is paid to it and confirmed on its phone.

  1. 1POST /v1/merchantsnumber, merchant numbers, ceiling, remittance
  2. 2“Be a maison of Sahel Market?”the conditions
  3. 3“Yes, I accept”, signedthe agreement
  4. 4merchant.acceptedthen merchant: mai_… on your payments
The maison accepts your conditions once; its customers then pay it on its numbers.
POST /v1/merchants
curl https://enotif.sahelab.com/v1/merchants \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+2250700000077",
    "label": "Chez Awa, Cocody",
    "daily_ceiling": 500000,
    "accounts": [
      { "operator": "orange_money", "number": "+2250700000077" },
      { "operator": "wave", "number": "+2250500000077" }
    ],
    "remittance": "commission",
    "commission_bps": 1000
  }'
FieldWhat it is
phonerequiredThe maison’s eNotif number (or its @handle). Not on eNotif: 422 partner_not_on_enotif.
labelrequiredThe maison’s name, 2 to 60 characters.
accountsrequired1 to 6 merchant numbers { operator, number }, one per operator, each operator offered in the number’s country (operators table).
daily_ceilingrequiredWhat may be asked of it per day (pending, declared or paid), in currency units. Beyond: merchant_ceiling_reached.
remittanceoptionalWhat it hands over to you: none (default), commission (with commission_bps, 1000 = 10%) or all. Informative: eNotif never moves money; owed says what remains to hand over.
confirmersoptionalUp to 5 eNotif numbers (its cashiers) who confirm its payments; the first to answer counts. Default: its own phone.
currencyoptionalXOF by default; the maison’s payments are in that currency.
CallWhat it does
GET /v1/merchants · GET /v1/merchants/{id}Your maisons of this environment: status, numbers, ceiling and today’s room, paid, handed over, owed.
PATCH /v1/merchants/{id}Changes label, accounts, daily_ceiling, remittance, commission_bps, paused.
POST /v1/merchants/{id}/inviteInvites again after a refusal or an unanswered invitation.
POST /v1/merchants/{id}/endEnds the agreement (reason optional): no more merchant payments.

Webhooks: merchant.accepted, merchant.declined, merchant.ended (data.object is the merchant object). The console has its Maisons page.

Test numbers (Test mode)

Like Stripe’s test cards: in Test mode, any number whose national part starts with 0000 stands for a maison that is not on eNotif yet. No operator issues such numbers; they exist in Test only, never in Live.

NumberWhat happens
+225 00 00 00 00 01 · +223 0000 0001 · … (any number not ending in 2)The maison accepts at once: status: active, merchant.accepted.
+225 00 00 00 00 02 · +223 0000 0002 · … (ending in 2)The maison declines: status: declined, merchant.declined.

One test number per demo establishment (…0001, …0003, …0011…): its payments are simulated like any other Test payment. The minimum: phone and daily_ceiling; without accounts, the maison is paid on its own number.

Try it here POST/v1/merchants

It hands overremittanceInformative: eNotif never moves money.
Request
The phone on the right answers.The phone below answers.

Merchants’ frequently asked questions

What exists today, and what is planned — plainly.

Does eNotif collect my customers’ money?

No. The customer pays directly on your merchant number (or your maison’s, your point of sale’s) by Mobile Money, or in cash. eNotif neither collects nor holds money: it has the customer sign “I have paid” and the receiver sign “I received it”, keeps both proofs and tells you by webhook.

In which countries, with which operators?

Mali, Senegal, Côte d’Ivoire (Orange Money, MTN MoMo, Moov Money, Wave) and Togo (Flooz, T-Money). The operators table above is read live: prefixes and USSD codes marked “to be checked” until confirmed on a real phone. Wave has no USSD code: the customer copies the number and opens the Wave app.

I have several restaurants: can each be paid on its own numbers?

Yes, those are maisons: invited by number, they accept your conditions on their phone (daily ceiling, numbers, what they hand over). Then merchant: mai_… on a payment is enough.

Can several cashiers confirm payments?

Yes: collectors on a payment, or a maison’s confirmers (up to 5 phones). All receive the question; the first answer counts.

The customer paid but nobody confirmed in time?

The payment is not cancelled: it becomes awaiting_confirmation (webhook of the same name), the team is reminded every 6 h, 3 times, and a late confirmation settles it. The window goes from 15 minutes to 24 hours (confirmation_window).

How do I refund a customer?

POST /v1/payments/{id}/refunds. Whoever was paid signs that they sent the money back, the customer signs that it arrived; a credit note lands in their Vault. eNotif does not make the transfer itself.

Can a point of sale receive Mobile Money?

Yes: give it its numbers (accounts), then point_of_sale: ptn_… on the payment. It holds it for you, like cash, within its daily ceiling.

Can I bill a subscription whose amount changes every month?

Yes: a variable-amount plan. The person signs a monthly ceiling once; before each due date you announce the amount (never above it), and it arrives in their Vault as an invoice they pay themselves. With no amount announced, nothing is asked.

And bank cards?

Not today: accepting a card takes a licensed payment provider, which eNotif does not have. An option with a provider is planned; meanwhile, Mobile Money and cash only.

Côte d’Ivoire’s FNE?

You can attach the normalised-invoice number and its QR to a receipt (fne): they are signed, printed on the PDF and shown in the app. eNotif does not create the FNE itself: a direct integration would only come with a DGI accreditation.

Do I read the messages between my customers and my sellers?

Only if you switch it on (Console › Contacts): each message then reaches you by webhook, with no number, and both people see that you read it. Otherwise nothing reaches you.

How do I pay eNotif?

Through your plan (see Pricing): it sets the number of payments, points of sale and sends per month. eNotif takes nothing from your payments’ money.

Cards

A card lands in To do: an appointment to confirm, a sum to pay, a courier who arrived, a piece of information. The person’s answer (“I confirm”) is signed by their phone and comes back as the card.acted webhook.

POST /v1/notify
curl https://enotif.sahelab.com/v1/notify \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000001",
    "kind": "appointment",
    "title": "Check-up appointment",
    "body": "Bring your health book.",
    "data": { "starts_at": 1791460800, "place": "Clinique Pasteur, Bamako" }
  }'
FieldWhat it is
phone or userrequiredThe person.
kindrequiredinfo, arrival, appointment, document or due.
titlerequired2 to 80 characters. body optional, 1,000 at most.
dataBy kind: starts_at and place (appointment), amount and due_date (due), name and plate (arrival).
title_en, body_enoptionalYour English words: a person who reads English sees them instead.
actionsoptionalUp to 3 buttons { id, label }.

Webhooks: card.viewed, card.acted ({ card, action, proof }).

Try it here POST/v1/notify

Card kindkindWhat the person sees and can answer.
Request
The phone on the right answers.The phone below answers.

Receipts

A receipt signed by eNotif, kept in the person’s Vault, with its PDF and a QR to /verifier/rcp_…. Amounts are checked (422 amounts_mismatch). A successful eNotif payment gives one by itself (console › Sent › Automatic receipts).

POST /v1/receipts
curl https://enotif.sahelab.com/v1/receipts \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000001",
    "external_ref": "sale-2291",
    "number": "SM-2026-000412",
    "currency": "XOF",
    "merchant": { "name": "Sahel Market", "address": "ACI 2000, Bamako" },
    "lines": [ { "label": "Broken rice 25 kg", "quantity": "2", "unit_price": "12500", "total": "25000" } ],
    "subtotal": "25000",
    "total": "25000",
    "payment": { "method": "mobile_money", "reference": "OM-77812" }
  }'

Answer 201: the receipt object, with signature (JWS RS256, key published at /oauth/jwks) and verify_url. Webhook: receipt.delivered.

Your presentation. "template": { "style": "classic" | "compact" | "ticket", "header": "…", "footer": "…", "fields": [ { "label": "Table", "value": "12" } ] }: a header and footer text (300 characters), up to 10 free fields, a style; the logo is your application’s, from the console. You define the content, eNotif draws, signs and delivers it — all of it is part of the signature.

Côte d’Ivoire — FNE. If the DGI gave your receipt a normalised-invoice number, add "fne": { "number": "2026-CI-000123", "qr_url": "https://…" } (qr_url optional, https): it is signed with the receipt, printed on the PDF with its QR, and shown in the app. eNotif does not create FNEs: a direct integration would only come with a DGI accreditation.

Try it here POST/v1/receipts

Quantity · unit pricequantity · unit_priceIn FCFA; eNotif checks the totals.
Request
The phone on the right answers.The phone below answers.

Invoices

A receipt’s body, plus due_date and, for a Pay button in the app, payment_options (the same methods as /v1/payments). Paid through eNotif, it turns paid by itself and a receipt follows; paid elsewhere, POST /v1/invoices/{id}/mark-paid.

POST /v1/invoices
{ …a receipt's body…,
  "due_date": "2026-10-31",
  "payment_options": { "methods": { "mobile_money": [{ "operator": "orange_money", "number": "+22376000000" }], "cash": false } } }

Webhooks: invoice.delivered, invoice.paid, then receipt.delivered; still unpaid the day after its due date, invoice.overdue (see Automatic reminders).

Try it here POST/v1/invoices

Quantity · unit pricequantity · unit_priceIn FCFA; eNotif checks the totals.
Request
The phone on the right answers.The phone below answers.

Quotes

A quote is an offer the person accepts or refuses, signed by eNotif and kept in their Vault. It waits in To do while it is pending. Accepted (accepted), it becomes an invoice that follows the usual path; refused (refused), it carries the reason given; past valid_until with no answer, it is expired (expired) and can no longer be decided. The person’s answer is signed by their phone.

POST /v1/quotes
curl https://enotif.sahelab.com/v1/quotes \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22370000001",
    "external_ref": "devis-881",
    "number": "DEV-2026-0012",
    "currency": "XOF",
    "merchant": { "name": "Sahel Bâtiment", "address": "Hamdallaye ACI, Bamako" },
    "lines": [ { "label": "Living-room painting (40 m²)", "quantity": "1", "unit_price": "75000", "total": "75000" } ],
    "subtotal": "75000",
    "total": "75000",
    "valid_until": "2026-11-15",
    "payment_terms_days": 15,
    "payment_options": { "methods": { "mobile_money": [{ "operator": "orange_money", "number": "+22376000000" }], "cash": true } }
  }'
FieldWhat it is
A receipt’s bodyrequiredphone or user, external_ref, number, currency, merchant, lines, subtotal, taxes, total, template, metadata… without payment: nothing is paid yet.
valid_untilrequiredThe answer deadline, YYYY-MM-DD, from today to one year ahead at most.
payment_terms_daysoptional0 to 90 days, 15 by default: the invoice’s due_date falls that many days after acceptance.
payment_optionsoptionalAs for /v1/invoices: carried onto the invoice, for its Pay button.
urloptionalAs for /v1/invoices: “Pay on the website”, carried onto the invoice.

Answer 201: the quote object (quo_…), with status, valid_until, decided_at, refuse_reason, invoice_id, signature and verify_url (/verifier/quo_…). The Idempotency-Key header works as for receipts.

The lifecycle. pending → accepted: eNotif creates an ordinary invoice carrying quote_id, the same external_ref and number, a due date on the day of acceptance plus payment_terms_days, and the quote’s payment_options or url; it is paid, marked paid or voided like any invoice. pending → refused, with refuse_reason: too_expensive, not_needed, chose_other or other. pending → expired once valid_until has passed.

Also GET /v1/quotes, GET /v1/quotes/{id} and GET /v1/quotes/{id}/document.

Webhooks: quote.sent, then quote.accepted (with invoice_id) or quote.refused — or, unanswered, quote.expired; then, for the invoice, invoice.delivered, invoice.paid and receipt.delivered.

Automatic reminders

eNotif reminds the person for you, in their inbox and on their phone, with a link that opens the document in the app. An unpaid invoice: 3 days before due_date, on the day, then 3, 7 and 14 days late (“Invoice FAC-2026-0042 for 25,000 FCFA, 3 days overdue · Pay”). An unanswered quote: 2 days before valid_until (“Your quote expires in 2 days”). Each reminder goes out once per document; once paid, voided, accepted or refused, nothing more goes out. No notification between 9 pm and 7 am, the person’s time: the reminder waits for 7 am.

You hear once: invoice.overdue the day after the due date of an invoice still unpaid, quote.expired the day after the validity date of a quote left unanswered. The object is the invoice or the quote, as GET /v1/invoices/{id} or GET /v1/quotes/{id} returns it.

In the console, your application’s Automatic reminders (GET/PUT /api/v1/console/apps/{app}/reminder-settings): enabled to switch everything off, invoice_before_days ([3]), invoice_on_due_date (true), invoice_after_days ([3, 7, 14]), quote_before_days ([2]) — up to 5 days each, from 1 to 30 —, and issuer_alerts for both webhooks. A subscription’s due dates have their own reminders.

Subscriptions

Sell by the period without silent debits: the person agrees once on their phone (“Subscribe to Sahelab Pro? 5,000 FCFA a month”), then each due date arrives in their Vault as an invoice they pay themselves (Mobile Money confirmed by your collector, cash), and the receipt follows. They can pay early, pay several months at once, switch the rhythm for the next due date, or stop. Each due date counts as an invoice and a payment of your plan.

Plans

POST /v1/plans
curl https://enotif.sahelab.com/v1/plans \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sahelab Pro",
    "prices": [
      { "months": 1,  "amount": { "value": "5000",  "currency": "XOF" } },
      { "months": 12, "amount": { "value": "50000", "currency": "XOF" } }
    ],
    "trial_days": 14,
    "grace_days": 3,
    "payment_options": { "methods": { "mobile_money": [{ "operator": "orange_money", "number": "+22376000000" }], "cash": false }, "collector": "+22376000000" }
  }'
FieldWhat it is
namerequired2 to 80 characters. Optional description, 200 at most.
amount_modefixed (default): the amount is signed at the agreement. variable: the agreement signs a ceiling per due date, you announce each amount.
pricesrequired (fixed)1 to 6 lengths, each once, 1 to 24 months, one currency. “12 months for the price of 10” is a 12-month price.
period_months, max_amountrequired (variable)The rhythm (1 by default) and the ceiling per due date.
trial_days0 to 90 free days before the first due date (fixed plans).
grace_days0 to 30 days after a due date before it is late (past_due), 3 by default.
payment_optionsAs for /v1/invoices: carried on each invoice, for its Pay button.

Also GET /v1/plans, GET /v1/plans/{id} and POST /v1/plans/{id} (the whole plan again, or {"archived": true}: no new subscriber). Running subscribers keep the amount they signed.

Subscribe a person

POST /v1/subscriptions
curl https://enotif.sahelab.com/v1/subscriptions \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "plan": "pln_…", "phone": "+22370000001", "period_months": 1, "external_ref": "user-42" }'

phone or user (usr_…), period_months (the plan’s first length by default), external_ref, metadata, locale. Answer 201: the subscription object (sub_…), pending, with consent_request (the request on the phone, action subscription_consent). A number that cannot be reached gives status: "refused" and failure_reason. One running subscription per number and plan (409 already_subscribed).

The lifecycle

StatusWhat it means
pendingThe agreement request waits for the person’s answer.
refused“No”, no answer in time, or a number that cannot be reached.
trialingThe trial runs; the first invoice arrives before its end.
activeUp to date. current_period_end says how far it is paid, next_due_at the next due date.
past_dueA due date is unpaid after grace_days: the person is told.
suspendedStill unpaid a few days later. Paying starts it again, from the day it is paid.
paused · canceledYour pause (POST …/pause, …/resume), or the stop (POST …/cancel, or the person themselves: cancel_reason: "person"). The invoice waiting is withdrawn.

A fixed plan: each invoice arrives a few days before its due date (its ring is the reminder). A rhythm change (POST /v1/subscriptions/{id} {"period_months": 12}) applies to the next due date. Paid through eNotif or marked paid (POST /v1/invoices/{id}/mark-paid), the invoice moves the subscription on.

Variable amount

A monthly commission, a water bill: before each due date, announce the amount. Never above the signed ceiling (422 cycle_above_max), one open due date at a time (409 cycle_open), the same reference answers the same due date. With no amount by the due date it is skipped: nothing is asked, it is never late.

POST /v1/subscriptions/{id}/cycles
{ "amount": { "value": "14250", "currency": "XOF" },
  "reference": "COM-2026-09",
  "description": "September commission",
  "lines": [ { "label": "Sales 1st–15th", "amount": { "value": "9000", "currency": "XOF" } },
             { "label": "Sales 16th–30th", "amount": { "value": "5250", "currency": "XOF" } } ] }

A higher ceiling needs a new agreement: POST /v1/subscriptions/{id}/max-amount {"max_amount": {…}} (subscription.consent_requested, then subscription.updated if the person agrees). Also GET /v1/subscriptions (status, plan, late=1, starting_after, limit), GET /v1/subscriptions/{id} and GET /v1/subscriptions/{id}/cycles.

Webhooks

subscription.created, .refused, .updated, .consent_requested, .renewed, .past_due, .suspended, .resumed, .paused, .canceled (the subscription object); subscription.cycle_opened, .cycle_paid, .cycle_skipped, .cycle_past_due (the subscription_cycle object, with invoice_id and receipt_id). Each invoice also sends its invoice.* and receipt.delivered.

An organisation without developers (a gym, a school, an association) does the same from its space: Subscriptions & dues.

Tickets

A ticket is what the person shows at the door. A bus ticket, a boarding pass, a concert seat, a gala table, a parking ticket, a meal voucher, a number in a queue, an order to collect. You send it to their number; it lands in eNotif, signed, with a code to scan.

  • A code that cannot be copied. By default the person’s phone shows a QR that changes every 10 seconds, signed by their trusted phone. A screenshot stops working within 30 seconds.
  • Readable offline. The ticket and its code stay on the phone; the gate checks even without a network.
  • You have the last word. At every scan eNotif checks the code, then asks for your verdict (Answering a verification).
POST /v1/tickets — a bus ticket
curl https://enotif.sahelab.com/v1/tickets \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: sb-2291" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22376000000",
    "type": "transport", "category": "bus",
    "title": "Bamako → Ségou",
    "issuer": "Sahel Bus",
    "holder_name": "Awa Traoré",
    "reference": "SB-2291",
    "external_ref": "booking-2291",
    "scope": "BKO-SEG-2026-10-12-0730",
    "details": { "from": "Bamako", "to": "Ségou", "departure_at": "2026-10-12T07:30:00Z", "seat": "12A", "gate": "B2" },
    "valid_until": "2026-10-12T12:00:00Z"
  }'

The fields

FieldWhat it says
typetransport, event, venue, parking, queue, access, voucher, order ou other. It only picks the icon and the layout. category refines it (bus, concert, gala, festival…).
title, referenceRequired. The title big, your ticket number small.
scopeThe event, route or venue ([A-Za-z0-9._:-], at most 60). A controller can be limited to it; the console counts scans per scope.
detailsKnown fields improve the layout: starts_at, ends_at, departure_at, arrival_at, from, to, venue {name, address, map_url}, seat, section, row, table, zone, gate, door, tier, dress_code, admits, image_url (https), plate, value {value, currency}, items, total, pickup, ready_from, collect_before. The rest: fields, at most 8 {label, value} rows.
uses_allowed1 by default. 3 for a 3-day festival, 10 for a 10-ride card; null: unlimited entries (a subscription).
transferableNo by default. Yes: the person can transfer it to another eNotif number, who accepts it signed.
codeAbsent: the rotating code (recommended). For paper or an existing reader, a static code: { "format": "qr" | "code128" | "pdf417" | "aztec", "value": "…" }, shown « Static code » (weaker: it can be copied).

One example per family

Flight
{ "type": "transport", "category": "flight", "title": "Bamako → Dakar", "issuer": "Air Sahel", "reference": "AS-4F2K9Q",
  "details": { "from": "BKO", "to": "DSS", "departure_at": "2026-11-02T09:45:00Z", "gate": "4", "terminal": "1", "seat": "17C", "class": "Économique" } }
Concert
{ "type": "event", "category": "concert", "title": "Festival sur le Niger — soirée", "reference": "FN-00981", "scope": "fsn-2026-soir-1",
  "details": { "starts_at": "2026-02-05T20:00:00Z", "venue": { "name": "Quai de Ségou", "map_url": "https://maps.google.com/?q=Segou" }, "zone": "Fosse", "image_url": "https://…/affiche.jpg" } }
Gala
{ "type": "event", "category": "gala", "title": "Gala de la Croix-Rouge", "reference": "GALA-07",
  "details": { "starts_at": "2026-12-12T20:00:00Z", "venue": { "name": "Hôtel de l’Amitié" }, "table": "7", "tier": "VIP", "dress_code": "Tenue de soirée", "admits": 2 } }
Parking
{ "type": "parking", "title": "Parking ACI 2000", "reference": "PK-5512", "valid_until": "2026-10-12T18:00:00Z",
  "details": { "plate": "AB-1234-MD", "zone": "B" } }
Meal voucher
{ "type": "voucher", "title": "Bon repas cantine", "reference": "BR-0042", "valid_until": "2026-12-31T23:59:59Z",
  "details": { "value": { "value": "2500", "currency": "XOF" } } }
Queue
{ "type": "queue", "title": "Mairie de Bamako", "reference": "Q-A042",
  "queue": { "number": "A042", "service": "État civil", "position": 9, "estimated_wait_min": 25 } }
Order to collect
{ "type": "order", "title": "Commande 2291", "reference": "CMD-2291",
  "details": { "items": [ { "label": "Riz brisé 25 kg", "quantity": 2, "amount": "25000" } ], "total": "25000", "currency": "XOF",
               "pickup": { "name": "Sahel Market ACI 2000", "hours": "8 h – 20 h", "map_url": "https://maps.google.com/?q=ACI2000" },
               "collect_before": "2026-10-15T20:00:00Z" } }

A queue and an order move on: progress goes waiting → near → called → served (or left), or preparing → ready → collected. A collected order becomes used; paid through eNotif, its receipt is in the Vault.

Try a ticket

Pick a family and send: the ticket reaches the phone with its rotating code. Then Simulate a scan plays the door (eNotif checks, your server answers ticket.verify, the entry is consumed: ticket.used); a queue moves up to the counter; an order becomes ready. On my phone sends it to yours: scan it with Control in the app.

Try it here POST/v1/tickets

FamilytypeA preset: the icon and the layout.
Request
The phone on the right answers.The phone below answers.

Updating a ticket

PATCH /v1/tickets/{id} with only what changes. The person is told in the right words:

You sendOn their phone
{ "details": { "gate": "B4" } }« Your boarding changes, gate B4 »
{ "details": { "departure_at": "…" } }« The time changes »
{ "queue": { "position": 3 } }« Your turn is coming » (once, at 3 places or fewer)
{ "progress": "called", "queue": { "counter": "3" } }« It’s your turn — counter 3 », urgent ring and vibration
{ "progress": "ready" } (order)« Your order is ready »
{ "status": "cancelled" }The ticket is stamped « Cancelled »

GET /v1/tickets et GET /v1/tickets/{id} read back what you issued.

Verifying a ticket

Two ways, your choice, the same verdict.

1. Controllers in the eNotif app

  1. Console › Tickets › ControllersInvite someone by their eNotif number, limited if you wish to ticket types and scopes (a concert, a route).
  2. They accept on their phone« Yes, I accept », signed by their phone. They then see « Check tickets » in Me.
  3. They scanThe screen turns green « Valid » (name, seat, route), orange « Already used at 08:42 by Moussa », or red « Invalid », « Expired », « Cancelled », « Wrong route ». One tap on « Validate entry » consumes the ticket — signed by their phone.
  4. No networkTheir phone keeps, for its scope, the tickets and each holder’s public key (signed by eNotif, checkable with /oauth/jwks). They still validate; everything is sent when the network returns, and a double use comes back as ticket.disputed.

2. Your own reader

POST /v1/tickets/verify?consume=true
curl "https://enotif.sahelab.com/v1/tickets/verify?consume=true" \
  -H "Authorization: Bearer sk_test_…" -H "Content-Type: application/json" \
  -d '{ "token": "ENT1.tkt_…", "place": "Porte 2", "entries": 1 }'

{
  "object": "ticket_verification",
  "verdict": "valid",                 // valid | used | invalid | expired | cancelled | wrong_route | refused | manual
  "source": "platform",               // platform | enotif | enotif_fallback | manual
  "consumed": true, "entries": 1,
  "enotif": { "verdict": "valid", "reason": null, "static_code": false },
  "platform": { "answered": true, "verdict": "valid", "message": null, "display": [], "latency_ms": 184 },
  "ticket": { "id": "tkt_…", "title": "Bamako → Ségou", "holder_name": "Awa Traoré", "seat": "12A", "uses_left": 0 },
  "last_use": { "at": "2026-10-12T07:24:51+00:00", "by": null }
}

Without consume=true nothing is consumed: it is a mere check. The same code, once consumed, is refused (reason: "replay"); so is a code older than 30 seconds (code_expired).

Checking a rotating code yourself

The code is ENT1.{tkt}.{exp}.{n}.{dev}.{signature}. The ECDSA P-256 / SHA-256 signature (r‖s, base64url) covers enotif:v1:ticket:{tkt}:{exp}-{n}:{dev}, made by the key of phone dev — the same key as for decisions.

Answering a verification

At every scan, eNotif asks for your opinion. Give a URL in Console › Tickets › Verification: eNotif posts ticket.verify there, signed exactly like a webhook (same secret, same X-ENotif-Signature header, X-ENotif-Event-Id for idempotency), and waits 3 seconds.

What you receive, what you answer
POST /enotif/verify-ticket
X-ENotif-Event: ticket.verify
X-ENotif-Signature: t=1791370812,v1=…

{ "type": "ticket.verify", "data": { "object": {
    "scan": "scn_…", "ticket": { "id": "tkt_…", "external_ref": "booking-2291", "user": "usr_…", … },
    "controller": { "id": "ctl_…", "label": "Moussa — Gare de Bamako" }, "place": "Porte 2", "at": 1791370812,
    "consume": true, "entries": 1, "enotif_check": { "verdict": "valid", "reason": null, "static_code": false } } } }

HTTP/1.1 200
{ "verdict": "valid", "message": "Have a good trip!", "display": [ { "label": "Bags", "value": "1" } ], "consume": true }
Node (Express)
app.post('/enotif/verify-ticket', express.raw({ type: 'application/json' }), (req, res) => {
  if (!verifySignature(req.body, req.get('X-ENotif-Signature'), process.env.ENOTIF_WEBHOOK_SECRET)) return res.sendStatus(400)
  const { ticket, enotif_check } = JSON.parse(req.body).data.object
  const booking = bookings.find(ticket.external_ref)
  if (!booking) return res.json({ verdict: 'invalid', message: 'Booking not found' })
  if (booking.departure !== '07:30') return res.json({ verdict: 'wrong_route', message: 'This ticket is for the 9 am bus' })
  res.json({ verdict: enotif_check.verdict, display: [{ label: 'Bags', value: String(booking.bags) }] })
})
PHP
$body = file_get_contents('php://input');
if (! verify_signature($body, $_SERVER['HTTP_X_ENOTIF_SIGNATURE'] ?? '', getenv('ENOTIF_WEBHOOK_SECRET'))) { http_response_code(400); exit; }
$scan = json_decode($body, true)['data']['object'];
$booking = find_booking($scan['ticket']['external_ref']);
header('Content-Type: application/json');
echo json_encode($booking === null
    ? ['verdict' => 'invalid', 'message' => 'Booking not found']
    : ['verdict' => $scan['enotif_check']['verdict'], 'display' => [['label' => 'Bags', 'value' => (string) $booking['bags']]]]);
  • verdict required; message 80 characters; display at most 4 rows; consume: false to refuse the entry while saying « valid ».
  • No answer within 3 s (or an error): the controller sees eNotif’s verdict, labelled « Checked by eNotif (no answer from the platform) ». In strict mode: « Check manually », nothing is consumed.
  • Offline: eNotif’s verdict on the spot; your opinion is asked at sync, and the controller is told if you disagree.

The lifecycle, in webhooks

EventWhendata.object
ticket.deliveredThe ticket reached the app.{ "id": "tkt_…", "object": "ticket", "status": "valid", … }
ticket.viewedFirst opened.{ "id": "tkt_…", "viewed_at": 1791370812, … }
ticket.scannedEvery scan, accepted or refused.{ "scan": { "verdict": "used", "controller": {…}, "platform": {…} }, "ticket": {…} }
ticket.usedAn entry consumed.{ "controller": { "label": "Moussa" }, "at": "…", "place": "Porte 2", "offline": false, "uses_left": 0, "kind": "transport", … }
ticket.updatedAfter a PATCH.{ "id": "tkt_…", "details": { "gate": "B4" }, … }
ticket.cancelled / ticket.expiredCancelled by you / past valid_until.{ "id": "tkt_…", "status": "expired", … }
ticket.disputedAn offline scan finds the ticket already used.{ "scan": { "disputed": true, … }, "ticket": {…} }
ticket.transferredTransferred and accepted.{ "ticket": {…}, "from": "usr_…", "to": "usr_…", "at": 1791370812 }
ticket.reported« It wasn’t me » after a validation.{ "ticket": {…}, "last_use": { "at": 1791370812, "controller": "Moussa" } }
queue.joined · queue.near · queue.called · queue.served · queue.leftNumber given · 3 places or fewer · their turn · served · « Leave the queue ».{ "id": "tkt_…", "queue": { "number": "A042", "position": 2, "counter": "3" }, "progress": "near", … }

Like every webhook: signed, retried until success, visible in the console. The person sees « Your ticket Sahel Bus was validated at 08:42 » — and can answer « It wasn’t me ».

Proof of delivery

The customer confirms on their phone what they received. Your platform (Yango Delivery, Gozem, a courier service) sends the delivery: the recipient, the items and their quantities, the cash to collect. Their phone shows « Delivery from Gozem: 10 bags of rice — Received / Something is missing ». The answer is signed by their trusted phone, quantities and amount included, and reaches you as a signed webhook.

  • A proof, not a ticked box. The phone signs enotif:v1:delivery-received|delivery-disputed:{dlv_…}:{challenge}~{quantities}~{amount}:{device}: the quantity received is part of the signature.
  • Something missing? The recipient gives the quantity received line by line, a reason and a photo: delivery.disputed.
  • eNotif never collects cash. The courier collects as usual; the recipient confirms the amount paid inside their signature.
curl — POST /v1/deliveries
curl https://enotif.sahelab.com/v1/deliveries \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+22376000000",
    "lines": [ { "label": "Rice bags 25 kg", "quantity": 10 } ],
    "cash": { "amount": "175000", "currency": "XOF" },
    "address": "Hamdallaye ACI 2000, street 312",
    "external_ref": "order-2291",
    "metadata": { "courier": "Ibrahim" }
  }'
PHP
$ch = curl_init('https://enotif.sahelab.com/v1/deliveries');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer '.getenv('ENOTIF_SECRET'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'user' => $order->enotif_user,          // or 'phone' => '+22376000000'
        'lines' => [['label' => 'Rice bags 25 kg', 'quantity' => 10]],
        'cash' => ['amount' => '175000', 'currency' => 'XOF'],
        'external_ref' => 'order-'.$order->id,
    ]),
]);
$delivery = json_decode(curl_exec($ch), true);   // $delivery['id'] = "dlv_…", 'status' => "en_route"
Node
const res = await fetch('https://enotif.sahelab.com/v1/deliveries', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.ENOTIF_SECRET}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    phone: '+22376000000',
    lines: [{ label: 'Rice bags 25 kg', quantity: 10 }],
    cash: { amount: '175000', currency: 'XOF' },
    external_ref: `order-${order.id}`,
  }),
})
const delivery = await res.json() // { id: 'dlv_…', status: 'en_route', … }

The fields

FieldWhat it says
phone or userThe recipient: their number (E.164) or the usr_… you already know. One or the other.
linesRequired. 1 to 20 lines { label, quantity }: 80 characters, whole quantity from 1 to 100,000.
cashOptional: { amount, currency }, the cash to collect at the door (major unit, as a string).
sender_nameThe name shown (« Delivery from … »); your application’s by default.
address, note, recipient_nameOptional, shown to the recipient.
external_refYour reference. The same one twice = the same delivery (200, Idempotent-Replayed: true), never a second notification.
metadata20 keys at most, returned as is in the object and the webhooks.

The answer and the webhook

201 with the delivery object (status: en_route). In live mode, a number not on eNotif, without a trusted phone, or that blocked your application answers 409 (delivery.recipient.not_registered, no_trusted_device, unavailable): use your usual way. Once the recipient has answered:

delivery.disputed — data.object
{ "object": "delivery", "id": "dlv_…", "livemode": true, "status": "partial", "outcome": "disputed",
  "user": "usr_…", "external_ref": "order-2291",
  "lines": [ { "label": "Rice bags 25 kg", "quantity": 10, "received": 8 } ],
  "cash": { "amount": "175000", "currency": "XOF", "paid": "140000" },
  "reason": "Two bags missing", "photo": true,
  "proof": { "method": "device", "device": "dev_…", "key_fingerprint": "…",
             "statement": "enotif:v1:delivery-disputed:dlv_…:…~8~140000:dev_…", "signature": "…", "signed_at": "…" },
  "verify_url": "https://enotif.sahelab.com/l/…" }
  • delivery.confirmed: everything received (status: delivered).
  • delivery.disputed: something missing (partial) or nothing received (refused), with reason. The delivery.disputed type also serves the Network contract between platforms: data.object.object is then network_event, here delivery.
  • GET /v1/deliveries/{id} as a fallback; verify_url opens the public proof (the PDF’s QR).

Sandbox

With sk_test_, only your testers get the delivery on their phone (« Test » banner). To any other number it is simulated (simulated: true) and decided with POST /v1/sandbox/deliveries/{id}/confirm or /dispute ({ "received": [8], "reason": "…" }): the same webhook leaves.

No platform? eNotif Delivery does the same without a line of code: deliveries, couriers, an SMS code for customers without eNotif.

Transport

eNotif Transport is a bus company’s ticketing, without a line of code. The carrier creates its organisation, adds its stations, its routes and fares, its buses and schedules. Its agents sell at the counter, its passengers book online, its drivers scan at the door. The ticket lands in eNotif, with the seat and a QR that changes every 10 seconds.

  1. The organisation. On the organisation space, « Continue with eNotif », then create the carrier (kind « Carrier »).
  2. The team. In « Members », invite by number: Counter agent, Driver, Controller, Station manager. Each one accepts on their phone.
  3. The network. « Stations and routes »: the stations, then a route (Bamako → Ségou → Sikasso) with each stop’s time and a price per trip, adult and child.
  4. The fleet. « Fleet »: the plate, the number of seats (the seat map is drawn afterwards), insurance, inspection, papers. eNotif warns before the due dates.
  5. Schedules. « Every day at 07:30, bus 12, Moussa driving »: the departures of the next 14 days are made by themselves.
  6. Sell. At the counter (web or app): the departure, the trip, the seat on the map, the name and number, cash or Mobile Money. Online: the page /voyage/{carrier}. Through a platform: the API.
  7. Board. The driver opens the departure in the app (« Check tickets ») or plugs a handheld scanner into a computer: valid, already aboard, another departure, not paid… The count goes up.
  • A seat is never sold twice, even by two counters in the same second, and a seat sold Bamako → Ségou is free from Ségou to Sikasso.
  • The passenger is told of a delay, a gate, a cancellation (owed a full refund), and called to board full screen.
  • Without eNotif, the passenger gets a printable ticket or a WhatsApp link /tr/…: its QR is scanned at the door the same way.
  • Mobile Money goes to the carrier’s merchant numbers; eNotif never touches the money.

Try it: a ticket sold by a platform

Pick the trip and the seat, send: the ticket lands on the phone. Then delay the departure, call to board and scan at the door.

Try it here POST/v1/transport/bookings

TriptoWhere the passenger gets on and off (a trip of the route).
SeatseatA free seat of the map. Absent: the first free one.
Request
The phone on the right answers.The phone below answers.

The API for platforms

A travel site, an agency or your own app sells the carrier’s seats with a key the carrier gives it (« Transport settings » → « Keys for platforms »). The key starts with trk_ and only works for that carrier.

CallWhat it does
GET /v1/transport/tripsThe stations and routes, with the lowest price.
GET /v1/transport/trips?from=sta_…&to=sta_…&day=2026-10-12The day’s departures on that trip: times, free seats, adult and child fares.
GET /v1/transport/trips/{dep_…}?from=…&to=…The trip’s seat map, free and taken.
POST /v1/transport/bookingsSells a seat. payment: "external" when you collected (confirmed at once), "mobile_money" for the passenger’s phone to pay the carrier (seat kept a few minutes). One booking per external_ref.
GET /v1/transport/bookings/{bkg_…}The booking: status, eNotif ticket, printable ticket link.
POST /v1/transport/bookings/{bkg_…}/cancelCancels: the seat is free again, the ticket reads « Cancelled », the refund follows the carrier’s rule.
POST /v1/transport/bookings
curl https://enotif.sahelab.com/v1/transport/bookings \
  -H "Authorization: Bearer trk_…" \
  -H "Content-Type: application/json" \
  -d '{
    "departure": "dep_7Hq2kLmN3pQrS8tUvWx1Yz",
    "from": "sta_…", "to": "sta_…",
    "seat": "12",
    "passenger": { "name": "Awa Traoré", "phone": "+22370000001", "kind": "adult" },
    "payment": "external",
    "external_ref": "resa-2291"
  }'

Refusals have the usual shape { "error": { "type", "code", "message", "param" } }: seat_taken (409, the seat was just taken), full, no_fare, not_sellable_departed, promo_used_up, duplicate_external_ref…

Without a key, the public booking page uses /api/v1/public/transport/{carrier} (the same answers, Mobile Money payment only).

Guaranteed contact

Your “Contact the seller” button, without fake contacts. The buyer is verified by eNotif; the seller gets the listing’s card on their phone (photo, title, price) and “Awa T. ✓ is interested in your listing”. They answer in one tap: on WhatsApp, with a call, or with a quick reply. You follow every step by webhook.

  1. 1POST /v1/contactsthe listing, the verified buyer
  2. 2“Awa T. ✓ is interested…”the listing’s card
  3. 3“Answer on WhatsApp”or call, or a quick reply
  4. 4contact.answeredwith the channel
The buyer is verified, the seller answers where they like: you know the contact happened.
  1. The buyer is verifiedSigned in with “Continue with eNotif”: send their usr_… in from, it is immediate. Otherwise send their number: eNotif asks them “Contact this seller?” on their phone, and the contact goes out when they confirm (awaiting_buyer meanwhile).
  2. The seller is toldTheir phone rings with the listing. The contact waits 24 h for an answer, then expires (contact.expired).
  3. They answer in one tap“Answer on WhatsApp” opens the chat with the buyer, a first sentence ready; “Call”; or “Still available”, “Already sold”, “I’ll call you back”. They may also ignore it, or block the buyer.
  4. The buyer followsIn their eNotif: “Seen by the seller at 14:32”, “The seller is answering on WhatsApp”. Their number is shared by default; they may keep it (share_phone: false, or “Don’t share my number” in the app).
POST /v1/contacts
curl https://enotif.sahelab.com/v1/contacts \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: listing-42-awa" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+22370000002",
    "from": "usr_8Kd2mQ7xL4pR1nW9sYc3Bv",
    "listing": {
      "title": "iPhone 12, 128 GB",
      "image_url": "https://your-site.com/p/iphone.jpg",
      "price": "250000", "currency": "XOF",
      "url": "https://your-site.com/listings/42"
    },
    "message": "Is it still available?",
    "external_ref": "listing-42"
  }'
FieldWhat it is
torequiredThe seller’s number, E.164.
fromrequiredThe buyer: their usr_… (Connect, verified) or their E.164 number (they confirm on their phone).
listingrequiredtitle (2 to 120), and when you have them image_url (https), price and currency, url (on one of your application’s allowed domains).
messageoptionalThe buyer’s words, 500 characters at most.
share_phoneoptionaltrue by default: the seller may answer on WhatsApp or call. false: quick replies only.
confirmoptionaltrue by default: a buyer given by number confirms on their phone. false: your platform vouches for the number (its own signed-in account) — nothing is asked of the buyer, who needs no eNotif; the seller reads “Awa T., via your platform” with no ✓, and buyer.verified is false. With a number only.
hold_if_unreachableoptionaltrue: a seller not on eNotif yet gets the contact when they enrol, within 7 days (status held; contact.delivered then comes late). With a buyer already verified (Connect, or vouched for by your platform).
from_nameoptionalThe buyer’s name as you know it (2–80), shown when eNotif does not know them.
external_ref, metadataoptionalYour references, given back as they are.

The same call with the same Idempotency-Key returns the same contact. A buyer sends 5 contacts an hour at most (429).

The seller is not on eNotif? The answer is 201 with "status": "unreachable" and a fallback: whatsapp_url (the WhatsApp chat with the seller, the message ready) and invite_url (to invite them to install eNotif). Open it for the buyer: they are never stuck.

Try a contact

Send it: the phone is the seller’s. Tap the notification, then answer — WhatsApp, a call or a quick reply — and watch the webhooks arrive. On my phone gives you both roles: you confirm first as the buyer, then the contact reaches you as the seller.

Try it here POST/v1/contacts

Share the numbershare_phoneThe seller may answer on WhatsApp or call
Request
The phone on the right answers.The phone below answers.

Statuses and webhooks

contact
{
  "id": "cnt_4Hq9LmT2vXc8RpN1sKw7Zb",
  "object": "contact",
  "livemode": false,
  "status": "answered",
  "failure_reason": null,
  "declined_by": null,
  "seller": { "user": "usr_2Mn…", "phone": "+22370000002" },
  "buyer": { "user": "usr_8Kd…", "verified_by": "connect", "shares_phone": true },
  "listing": { "title": "iPhone 12, 128 GB", "price": "250000", "currency": "XOF", "url": "https://your-site.com/listings/42" },
  "message": "Is it still available?",
  "channel": "whatsapp",
  "reply": null,
  "delivered_at": 1791370812, "opened_at": 1791370870, "answered_at": 1791370902,
  "expires_at": 1791457212,
  "created_at": 1791370812
}
StatusWhat happenedWebhook
awaiting_buyerThe buyer is confirming on their phone.—
deliveredThe seller’s phone rang.contact.delivered
openedThe seller opened it.contact.opened
answeredThey answered: channel is whatsapp, call or reply (then reply: available, sold, call_back). A quick reply after WhatsApp sends another contact.answered.contact.answered
declineddeclined_by: buyer (did not confirm) or seller (ignored it).contact.declined
expiredNo answer within 24 h (or the buyer did not confirm in time).contact.expired
unreachableNothing went out. failure_reason: not_registered (seller not on eNotif), buyer_not_registered, recipient_unavailable, not_a_tester. Read fallback.—

GET /v1/contacts (with ?status=) and GET /v1/contacts/{id} read them back; the console lists them under Contacts. Tick the contact.* webhooks in Webhooks.

WhatsApp on your items

Any card (/v1/notify), ticket (/v1/tickets) or receipt (/v1/receipts) may carry contact: the person sees “WhatsApp” and “Call” and reaches the shop, the driver or the hall in one tap.

contact
"contact": { "whatsapp": "+22376000000", "phone": "+22376000000" }

Two E.164 numbers at most, either one is enough. On a receipt, it is signed with the merchant.

Pending actions

One link, nothing to type on your site. You prepare the action (today: order an item, or contact a seller) for someone you do not know yet; eNotif gives you a link. The person taps it: the eNotif app opens on the action (installed, or installed for it — the action is kept), shows the listing card, and one tap tells the seller, from the verified person.

POST /v1/intents
curl https://enotif.sahelab.com/v1/intents \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "contact", "purpose": "order", "to": "+22370000002", "seller_name": "Moussa Diarra", "listing": { "title": "iPhone 13, 128 Go" }, "external_ref": "listing-42", "hold_if_unreachable": true }'

# { "id": "int_…", "object": "intent", "status": "pending", "url": "https://enotif.sahelab.com/go/itk_…" }
  • url is given once: make it the link of your “Order with eNotif” button (on a product page) or “Contact with eNotif” (on a shop, anywhere else) — the hosted widget data-enotif-contact draws them, with data-label="order" or "contact". The installed app takes it; otherwise the page offers to open or install eNotif, and the action waits 7 days.
  • purpose (optional): order on a product page — the app asks “Order from Moussa: iPhone 13 — 250,000 FCFA?” —, contact anywhere else — “Contact Moussa?”. Default contact.
  • Statuses: pending, opened, completed (contact, user), expired. Webhooks intent.opened, intent.completed, intent.expired.

eNotif Network

eNotif connects your platform with people, with their consent. You ask, the person answers on their phone, every answer is signed. Three building blocks are enough to start:

BlockWhat it does
/identityContinue with eNotif: standard OpenID Connect sign-in. Your users enter their number and confirm on their phone.
/oauth/deviceLink a screen: a TV, a computer, a kiosk signed in with one “Allow” on the phone (RFC 8628).
/discoverNetwork Directory: is this number reachable on eNotif? Yes or no, nothing else.
external_refYour own user id, kept beside every request. No migration of your accounts.

What we guarantee people

  • The number is for finding, never for identifying. Every platform gets an id of its own (a « pairwise » sub, the same usr_… as the API). Two platforms cannot match their users.
  • No public directory. The Network Directory is reserved for verified platforms, rate-limited, billed against the plan and audited. It only answers « reachable » or not. Anyone can make themselves unreachable in one tap.
  • Nothing without consent. The number, the name and the @handle leave only after « Continue » on the consent screen. The person removes the access whenever they want, in eNotif, Services.

Continue with eNotif

eNotif is an OpenID Connect provider. Keycloak, Auth0, Supabase, Auth.js (NextAuth), Laravel Socialite, WordPress or Odoo plug in with three values: the issuer URL, a client id and a secret.

  1. 1GET /oauth/authorizethe person taps « Continue with eNotif »
  2. 2login« Sign in to Sahelab Marketplace », the number to tap
  3. 3approve« Yes, it’s me », signed on the phone
  4. 4?code=…&state=…after the consent screen
  5. 5POST /oauth/tokencode + code_verifier (PKCE)
  6. 6RS256-signed id_tokenpairwise sub, number, name
The one-minute code works once; the id_token is checked with the JWKS.

In 5 minutes

  1. Console › ConnectAdd your site’s redirect URI (https, or http://localhost while developing). Copy the client id and secret: the secret is shown once.
  2. Your libraryGive it the issuer https://enotif.sahelab.com: it reads everything else from /.well-known/openid-configuration.
  3. The buttonPut the official button (below) on your sign-in page.
  4. Try itWith the test client, only your testers receive the request; other requests are decided from the console.
// Laravel Socialite + a generic OpenID Connect driver (a SocialiteProviders « oidc » driver,
// registered as 'enotif'): it reads every endpoint from the issuer.
// config/services.php
'enotif' => [
    'client_id' => env('ENOTIF_CLIENT_ID'),          // enc_live_…
    'client_secret' => env('ENOTIF_CLIENT_SECRET'),  // ecs_live_…
    'redirect' => env('APP_URL').'/auth/enotif/callback',
    'base_url' => 'https://enotif.sahelab.com',
],

// routes/web.php
Route::get('/auth/enotif', fn () => Socialite::driver('enotif')
    ->scopes(['openid', 'phone', 'profile'])->enablePKCE()->redirect());

Route::get('/auth/enotif/callback', function () {
    $person = Socialite::driver('enotif')->user();
    // $person->getId(): the pairwise id (usr_…), the same each time, yours only.
    $user = User::firstOrCreate(['enotif_id' => $person->getId()], [
        'name' => $person->getName(),
        'phone' => $person->user['phone_number'] ?? null,
    ]);
    Auth::login($user);
    return redirect('/');
});
AddressRole
/.well-known/openid-configurationDiscovery: everything your library needs.
/oauth/authorizeThe eNotif page: number, confirmation on the phone, consent.
/oauth/tokenThe code for the tokens. client_secret_basic or client_secret_post.
/oauth/userinfoThe consented claims, with the access token (one hour).
/oauth/jwksThe public keys to check the id_token.
/oauth/revokeEnds a token (RFC 7009).
ScopeWhat you receive
openidrequiredsub: an id of your platform’s own, stable, never the number.
phonephone_number (E.164) and phone_number_verified: true.
profilename and preferred_username (the @handle).

PKCE S256 recommended (Auth.js always sends it). A code presented twice is refused and ends the tokens it gave. The redirect URI must match the registered one, character for character.

The official button

A hosted script draws the button in eNotif’s colours, with its line. data-href is your own route that starts the sign-in.

HTML
<div data-enotif-connect data-href="/auth/enotif"></div>
<script src="https://enotif.sahelab.com/enotif.js?v=1" async></script>

data-theme="light" on a coloured background, data-size="compact" in a bar, data-lang="fr" in French.

No eNotif yet?

The page offers the install (Android or the web app). Once eNotif is installed with the same number, the request opens by itself at first launch, and your page continues. No extra permission: the link carries a waiting token, and the server finds the sign-in by the number enrolled.

Network Directory

Before sending a request, ask whether the number is reachable. false means: use your usual channel (SMS, e-mail).

  1. 1POST /v1/discover1 number, or up to 1000
  2. 2reachable: true | false+ user when already linked to you
  3. 3POST /v1/requests"external_ref": "42"
  4. 4The requeston the trusted phone
  5. 5« Yes », signedthe account links to you
  6. 6request.approveduser + external_ref
Reachable: a request. Unreachable: your usual channel.
POST /v1/discover
curl https://enotif.sahelab.com/v1/discover \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "phones": ["+22370000001", "+22376000000"] }'

{
  "object": "list",
  "data": [
    { "object": "discovery", "phone": "+22370000001", "reachable": true, "user": "usr_Q4mZ9xK2pL7nR1sT8vWy2A", "external_ref": "42" },
    { "object": "discovery", "phone": "+22376000000", "reachable": false }
  ],
  "reachable_count": 1
}
  • phone for one number, phones for a list of up to 1000; the order is kept.
  • user only when the person is already linked to your platform (an approved request, or a sign-in).
  • In production: verified platforms only (403 platform_not_verified otherwise). In test: « reachable » only for your testers.
  • 10,000 numbers per hour per platform (429 rate_limited), one call counted against the plan (discover), every call audited without the numbers.

Try it here POST/v1/discover

Request

Your existing users, no migration

Keep your ids. Send yours in external_ref with every request (1 to 128 characters A-Z a-z 0-9 . _ : @ | -): it comes back in the answer, in GET /v1/requests/{id} and in every webhook. With Continue with eNotif, pass it to /oauth/authorize: it comes back in the id_token and /oauth/userinfo.

Linking happens by itself

The first approved request, or the first sign-in, links the person to your platform: you get their usr_…, you may write to their eNotif inbox, and /v1/discover returns it. Nobody has anything more to do.

When it is unreachable

A request to someone without eNotif answers 201 with "status": "failed" and failure_reason: "not_registered" (or no_trusted_device, recipient_unavailable). That is the signal for your usual channel. To bring your users over, share the console’s invitation link (My users) through your own channels.

When the person removes the access

In eNotif, Services › Remove access ends your tokens, undoes the link and sends you permission.revoked:

permission.revoked
{ "object": "permission", "user": "usr_Q4mZ9xK2pL7nR1sT8vWy2A", "external_ref": "42",
  "scopes": ["openid", "phone", "profile"], "revoked_by": "user", "revoked_at": 1791460800 }

Sign the person out on your side. A new approved request links again: they decide every time.

Link a screen

Your app runs on a screen that is awkward to type on: a TV, a living-room computer, a tablet, a kiosk. Instead of typing a number and a code there, the person scans the screen’s QR with their phone (or types the 8 letters in eNotif, Link a screen) and taps “Allow”. Their phone signs the answer; the screen receives the same tokens as Continue with eNotif. It is the standard OAuth 2.0 Device Authorization Grant (RFC 8628), plus eNotif’s signature.

  1. 1POST /oauth/device/codeclient_id, scope, screen name
  2. 2user_code + QR“WDJB-MJHT”, 10 minutes
  3. 3Code scanned or typedthe screen, its country, what is shared
  4. 4Allow, signedor the 6 digits in code mode
  5. 5POST /oauth/tokenevery 5 s: authorization_pending…
  6. 6id_token + access_tokenonce; sid = the linked screen
Your server also receives the device.linked webhook, then device.unlinked if the person removes the screen.

In 4 steps

  1. Console › ConnectCreate the environment’s eNotif Connect client (test or production). A screen needs no redirect URI.
  2. Console › Link a screenTurn it on for that environment and pick the confirmation: approval (“Allow” on the phone) or code (the phone shows 6 digits the person types on the screen — proving they stand in front of it).
  3. The screen asks for a codeIt shows the QR (verification_uri_qr, a ready image) and the 8 letters, then polls /oauth/token every interval seconds.
  4. Your serverVerifies the id_token with the JWKS (as for Continue with eNotif), opens the screen’s session, ties it to sid, and closes it on device.unlinked.

In production, only applications verified by eNotif can link a screen (the name shown on the phone must be trustworthy). In test, only your testers can link a screen.

1. The screen asks for a code

A screen keeps no secret: it identifies with its client_id alone (public client). If you also send the secret, it must be right. Form or JSON body.

POST /oauth/device/code
curl https://enotif.sahelab.com/oauth/device/code \
  -d client_id=enc_live_… \
  -d scope="openid profile" \
  -d device_name="Samsung TV living room" \
  -d device_kind=tv

{
  "device_code": "edc_9Qm…",
  "user_code": "WDJB-MJHT",
  "verification_uri": "https://enotif.sahelab.com/relier",
  "verification_uri_complete": "https://enotif.sahelab.com/relier?code=WDJBMJHT",
  "verification_uri_qr": "https://enotif.sahelab.com/relier/qr.svg?code=WDJBMJHT",
  "expires_in": 600,
  "interval": 5,
  "confirmation": "approval",
  "screen_link": "scl_4Hq2kLmN3pQrS8tUvWx1Yz"
}
ParameterRole
client_idrequiredThe environment’s eNotif Connect client (enc_test_… or enc_live_…).
scopeopenid by default; phone and profile as for Continue with eNotif.
device_nameShown as is on the phone (40 characters at most): “Samsung TV living room”.
device_kindtv, computer, tablet, console, kiosk or other (default).
nonceEchoed in the id_token.

Show user_code large, the short verification_uri, and the QR. The country of the screen’s network is noted: the person sees it, and is warned when their phone is in another country.

2. The person confirms on their phone

They scan the QR with the camera (the eNotif app opens) or type the code in Link a screen. The phone shows your application’s name and logo (“verified” tick), the screen (“Samsung TV living room · TV”), where the screen is, what will be shared and the code, to compare with the screen. “Allow” is signed by the device, like any request. In code mode, the phone then shows 6 digits:

POST /oauth/device/verify — code mode
curl https://enotif.sahelab.com/oauth/device/verify \
  -d client_id=enc_live_… -d device_code=edc_9Qm… -d code=482913

{ "status": "approved" }
// wrong: 400 { "error": "invalid_code", "attempts_remaining": 4 }; the 5th try refuses the screen.

3. The screen polls

POST /oauth/token
curl https://enotif.sahelab.com/oauth/token \
  -d grant_type=urn:ietf:params:oauth:grant-type:device_code \
  -d device_code=edc_9Qm… \
  -d client_id=enc_live_…

{
  "access_token": "eat_…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile",
  "id_token": "eyJhbGciOiJSUzI1NiIs…",
  "screen_link": "scl_4Hq2kLmN3pQrS8tUvWx1Yz"
}
Answer (HTTP 400)What the screen does
authorization_pendingNo answer yet: try again after interval seconds.
slow_downToo fast: add 5 seconds (the answer gives the new interval).
access_deniedRefused on the phone: offer to start again.
expired_tokenThe code expired (10 minutes): ask for a new one.
invalid_grantUnknown code, another client’s, or tokens already handed (once only).
unauthorized_client(at /oauth/device/code) Link a screen is off, or the application is not verified in production.

The id_token carries the pairwise sub (the same usr_… as the API), the accepted claims, and sid: the linked screen’s id. Keep sid with the screen’s session.

An example for a TV or a web page

JavaScript
const ENOTIF = 'https://enotif.sahelab.com', CLIENT_ID = 'enc_live_…'
const form = (o) => ({ method: 'POST', body: new URLSearchParams(o) })

async function linkScreen(show) {
  const start = await (await fetch(ENOTIF + '/oauth/device/code',
    form({ client_id: CLIENT_ID, scope: 'openid profile', device_name: 'Living room', device_kind: 'tv' }))).json()
  show({ code: start.user_code, url: start.verification_uri, qr: start.verification_uri_qr }) // <img src={qr}>

  let wait = start.interval
  const until = Date.now() + start.expires_in * 1000
  while (Date.now() < until) {
    await new Promise((r) => setTimeout(r, wait * 1000))
    const res = await fetch(ENOTIF + '/oauth/token', form({
      grant_type: 'urn:ietf:params:oauth:grant-type:device_code', device_code: start.device_code, client_id: CLIENT_ID }))
    const body = await res.json()
    if (res.ok) return body                      // send body.id_token to your server
    if (body.error === 'slow_down') wait = body.interval
    else if (body.error !== 'authorization_pending') throw new Error(body.error) // access_denied, expired_token
  }
  throw new Error('expired_token')
}

Your server verifies the id_token (RS256 signature with https://enotif.sahelab.com/oauth/jwks, aud = your client id, exp), then opens its own session for the screen.

Webhooks and following the screens

EventWhen
device.linkedThe person allowed the screen.
device.deniedRefused on the phone (denial: user, reported for “It wasn’t me”, code_attempts).
device.unlinkedThe screen was removed (unlinked_by: user in Linked screens, application through your API). Close the screen’s session.
data.object — screen_link
{ "id": "scl_4Hq2kLmN3pQrS8tUvWx1Yz", "object": "screen_link", "livemode": true, "status": "linked",
  "user": "usr_Q4mZ9xK2pL7nR1sT8vWy2A", "device": { "name": "Samsung TV living room", "kind": "tv" },
  "place": { "city": "Bamako", "country": "ML" }, "scope": "openid profile", "confirmation": "approval",
  "denial": null, "unlinked_by": null, "created_at": 1791370800, "expires_at": 1791371400,
  "linked_at": 1791370842, "last_used_at": 1791370842, "unlinked_at": null }
Route (sk_… key)Effect
GET /v1/screen-links?status=&user=&limit=&starting_after=Your screens, newest first.
GET /v1/screen-links/{id}One screen; status: "unlinked" = close its session.
POST /v1/screen-links/{id}/activityThe screen is in use (session resumed): “Last used” in the person’s app.
POST /v1/screen-links/{id}/unlinkYou sign the screen out yourself: its tokens die, device.unlinked follows.

What protects the person

  • An 8-letter code with no vowel and no L (BCDFGHJKMNPQRSTVWXZ), valid 10 minutes, kept hashed; a 256-bit device_code, hashed, bound to your client, tokens handed once.
  • Guessed codes: 5 misses per person in 15 minutes, 20 per network in an hour, then a wait. A code taken by one phone is useless to anyone else.
  • The phone shows the screen’s country and warns when the phone is elsewhere: a QR sent from far away shows. In code mode, finishing needs someone in front of the screen.
  • Every step is logged, with no code or address in clear. The person removes a screen whenever they want, in Linked screens.

Make two platforms talk

Sahel Market sells, Rapide Livraison delivers. Through eNotif, the two platforms talk about the same customer, Awa, with her consent, given once on her phone. Each knows her by its own usr_…: eNotif maps one to the other, and neither ever sees the other’s id.

  1. 1POST /v1/network/eventsdelivery.created, the order
  2. 2“Send your order?”Awa says yes, once, signed
  3. 3delivery.createdsigned webhook, her usr_… for them
  4. 4POST /v1/network/eventsdelivery.delivered
The shop sends, Awa agrees once, the courier receives and answers with the same call.
  1. Link the two platformsConsole › Linked platforms: Sahel Market proposes a relation to Rapide Livraison for proven delivery. Rapide Livraison, a verified platform, accepts in its console. Either side can end it.
  2. Send the first eventPOST /v1/network/events with to (the other platform’s app_…), user (your usr_… for the person, or your own external_ref), type, data and idempotency.
  3. The person consents, onceThe first send asks “Send your order to Rapide Livraison?” on their phone. Answer 201, "status": "awaiting_consent". Once they accept, the event leaves; later ones leave at once ("status": "delivered"). Both platforms receive network.consent.granted.
  4. The other platform receives a signed webhookSame signature and retries as your other webhooks. The person is named by its own usr_… and external_ref.
  5. It answers with the same callRapide Livraison sends delivery.out_for_delivery, then delivery.delivered, to Sahel Market, with its id for the person.
curl https://enotif.sahelab.com/v1/network/events \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "app_RapideLivraison0000000",
    "user": "client-42",
    "type": "delivery.created",
    "data": { "reference": "CMD-2291", "address": "Badalabougou, rue 12" },
    "idempotency": "cmd-2291-created"
  }'
FieldWhat it is
torequiredThe linked platform’s app_… id.
userrequiredYour usr_… for the person, or your external_ref. Unknown: 404 user_unknown.
typerequiredA step of the relation’s contract: delivery.created, delivery.out_for_delivery, delivery.delivered.
dataoptionalA free object, 8 KB at most, passed as is. reference is shown to the person when they confirm.
idempotencyoptionalYour key (80 characters at most, or the Idempotency-Key header): the same call replayed returns the same event, 200.

No active relation for this type: 403 relation_missing. The person declined or withdrew consent: 403 consent_refused.

Proven delivery

delivery.delivered does not leave on the courier’s word alone: eNotif asks the person “Did you receive your order?”. Answer 201, "status": "awaiting_confirmation".

  • Yes: both platforms receive delivery.delivered with the same signed proof (proof: the signed statement, the ES256 signature, the phone’s public key), verifiable with OpenSSL alone, like a request’s proof.
  • No, or no answer: both receive delivery.disputed.
delivery.delivered — received by each of the two
{
  "type": "delivery.delivered",
  "data": { "object": {
    "id": "nev_4Hq2mZ7xK9pL1nR8sTc3Vb",
    "object": "network_event",
    "status": "confirmed",
    "from": { "id": "app_…", "name": "Rapide Livraison" },
    "to": { "id": "app_…", "name": "Sahel Market" },
    "user": "usr_…",            // yours, for her
    "external_ref": "client-42",
    "data": { "reference": "CMD-2291" },
    "proof": {
      "request": "req_…", "verb": "approve",
      "statement": "enotif:v1:approve:req_…:…:dev_…",
      "signature": "…", "public_key": "BH3…", "signed_at": 1791370812
    }
  } }
}

What the person keeps

In the app, Services › Exchanges between services lists each pair of platforms they said yes to, with Remove. Removed: both receive network.consent.revoked, and nothing more passes.

Webhooks to tick in the console: delivery.created, delivery.out_for_delivery, delivery.delivered, delivery.disputed, network.consent.granted, network.consent.declined, network.consent.revoked. Both consoles list the exchanges (Linked platforms).

Every route, to try

Every route can be tried right here: paste your test key, open a route, tap “Send”. These are real requests to https://enotif.sahelab.com/v1, and real answers.

Ids carry over: after “Create a request”, its req_… fills “Read”, “Cancel”, “Verify” and “Simulate” on its own.

It stays in this tab and is only sent to the eNotif API. Close the tab: it is forgotten. No key yet? Create one in the console.

Your key

Requests

Payments

Test mode

eNotif inbox

Network

People

Events

Send a message to the inbox

The eNotif inbox is an inbox inside the app, for your important messages: “Your order is ready”, “Your password has changed”. Never advertising. You only write to people who have already approved one of your requests.

FieldDescription
phone or userThe recipient.
titlerequired2 to 80 characters.
bodyThe text, 1,000 characters at most.
urlAn https link to one of your application’s allowed domains (set in the console). It becomes an “Open” button.
metadataAs for a request.
POST /v1/messages
curl https://enotif.sahelab.com/v1/messages \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "user": "usr_Q4mZ9xK2pL7nR1sT8vWy2A",
    "title": "Your order is ready",
    "body": "Pick it up at the counter from 2 pm."
  }'

# { "id": "msg_…", "object": "message", "status": "sent", "failure_reason": null, … }

If the message cannot go: status: "failed" and failure_reason says why — not_linked (the person never approved a request of your application, and did not write to you within the last 24 hours with open conversations), not_registered, recipient_unavailable. A person who muted your application gets the message without a notification: you read sent.

Try it here POST/v1/messages

Request
The phone on the right answers.The phone below answers.

Talking with the person

On an order, a receipt, a ticket or a card, the person taps Write: their message reaches you through the message.received webhook, with about (the item) and about_item (its title, its amount). Answer with POST /v1/messages and the same about: your answer shows in the same conversation, the item pinned on top. In a conversation, title becomes optional.

Between buyer and seller. Each guaranteed contact or order becomes a conversation in both people’s Messages tab, on your platform: the product card, then each step (“Seen by the seller at 14:32”, “Still available”, “Answered on WhatsApp”), then their messages. Another product between the same people: the same conversation, a new card. You read nothing by default; switch on Receive the messages between buyers and sellers (Console › Contacts) to get each message as message.received with thread: "contact", from.user, to.user, about (the contact) — never a number. Both people see that you read it.

POST /v1/messages — an answer
{
  "phone": "+22370000001",
  "body": "Tomorrow at 10, at the counter.",
  "about": "tkt_8Kd2mQ7xL4pR1nW9sYc3Bv"
}

Link previews

An https link in a message shows as a card (image, title, description, site). eNotif prepares it server-side, never from the phone: https only, public addresses only (no private network, no redirect towards one), size and time limited, the image re-hosted by eNotif. You may also give your own card, which wins:

preview
"preview": {
  "url": "https://your-site.com/promo",
  "title": "Rice −20%",
  "description": "Until Sunday",
  "image_url": "https://your-site.com/promo.jpg"
}

preview.url must be on one of your application’s allowed domains; title 140 characters at most, description 300.

Open conversations

Like a WhatsApp business number: with Open conversations (Console › Settings › Application), anyone on eNotif can open your application’s thread and write to you, or send you a voice note, without ever having approved a request. The setting takes effect only once your application is verified by eNotif. Share your thread’s link: https://enotif.sahelab.com/fil/{app_…} (it opens the eNotif app, else the web version).

Their first message creates their usr_… with you: the message.received webhook carries it in user. Answer with POST /v1/messages and { "user", "body" } (no title) within 24 hours of their last message. Past that, if the person is not linked to your application, the message fails with failure_reason: "not_linked"; each new message from them opens 24 hours again. Never a first message from you to someone who did not write. A person who blocked you can no longer write to you and you read recipient_unavailable. The window counts per environment (production or sandbox).

Voice notes

A voice note arrives with body: null and attachment: kind: "audio", mime, seconds (its length, null when it could not be read) and url, a signed link valid for 1 hour, no API key, that returns the audio file (Range requests accepted): hand it as is to your speech-to-text service. After the hour, read the message again with GET /v1/messages/{id} for a fresh link. A note is 10 MB and 5 minutes at most; its type is read from its bytes.

message.received — a voice note
{
  "id": "evt_3vQ8mL2xK9pR4nW7sYc1Bd",
  "object": "event",
  "type": "message.received",
  "livemode": true,
  "created": 1795521600,
  "data": {
    "object": {
      "id": "msg_5MAlXk1o0QRChwGXixaghP",
      "object": "message",
      "livemode": true,
      "user": "usr_9Hc2pQ7xL4mR1nW8sYb3Kv",
      "phone": null,
      "title": "Zeroo",
      "body": null,
      "attachment": {
        "kind": "audio",
        "mime": "audio/mp4",
        "seconds": 6,
        "url": "https://enotif.sahelab.com/v1/voice-notes/msg_5MAlXk1o0QRChwGXixaghP?expires=1795525200&signature=…"
      },
      "url": null,
      "direction": "in",
      "about": null,
      "preview": null,
      "metadata": {},
      "status": "received",
      "failure_reason": null,
      "read_at": null,
      "created_at": 1795521600,
      "about_item": null
    }
  }
}
POST /v1/messages — the answer, within 24 hours
{
  "user": "usr_9Hc2pQ7xL4mR1nW8sYb3Kv",
  "body": "A driver reaches Faladié in 4 minutes."
}

Locations (static and live)

As on WhatsApp, the person can send you their location in your thread: Send my current location (a fixed point) or Share my live location for 15 min, 1 h or 8 h. The message arrives as message.received with kind: "location", body: null and location: lat (−90 to 90), lng (−180 to 180), accuracy_m (metres, or null), name and address (optional), live, expires_at (end of the live sharing, Unix seconds), updated_at, ended_at. Example: Zeroo takes that point as a ride’s pickup point.

Live, the person’s phone moves the same message (about every 20 s, never more than once every 10 s), only while the eNotif app is open: you receive message.updated (signed like the others, the same message object, the same id) on each move, then once more with live: false when they tap Stop sharing. At expires_at no event is sent: consider the sharing over. Keep the latest location per id and ignore an updated_at older than the one you already have (retries may arrive out of order).

Retention. eNotif never keeps a trail: each update overwrites the previous point. Once the sharing ends, the last point stays as a static location, deleted with the message. Between two people (a driver and his client) the same location is shared in their conversation; in a relayed buyer ↔ seller thread (thread: "contact") it also reaches you as message.received then message.updated.

Send the person to the right place. The link https://enotif.sahelab.com/fil/{app_…}?share=location opens your thread with the location choice already shown: one tap to send you their starting point.

message.received — a location
{
  "id": "evt_7nR2kQ9xL4mP1sW8vYc3Bd",
  "object": "event",
  "type": "message.received",
  "livemode": true,
  "created": 1795521600,
  "data": {
    "object": {
      "id": "msg_8KpLx2o0QRChwGXixaghQ",
      "object": "message",
      "livemode": true,
      "user": "usr_9Hc2pQ7xL4mR1nW8sYb3Kv",
      "title": "Zeroo",
      "kind": "location",
      "body": null,
      "attachment": null,
      "location": {
        "lat": 12.6392,
        "lng": -8.0029,
        "accuracy_m": 15,
        "name": "Grand Marché",
        "address": "Bamako, Commune III",
        "live": false,
        "expires_at": null,
        "updated_at": 1795521600,
        "ended_at": null
      },
      "direction": "in",
      "status": "received",
      "created_at": 1795521600,
      "about_item": null
    }
  }
}
message.updated — the live location moved
{
  "id": "evt_2bW9xK4mQ7pL1nR8sYc5Vd",
  "object": "event",
  "type": "message.updated",
  "livemode": true,
  "created": 1795521640,
  "data": {
    "object": {
      "id": "msg_8KpLx2o0QRChwGXixaghQ",
      "object": "message",
      "kind": "location",
      "user": "usr_9Hc2pQ7xL4mR1nW8sYb3Kv",
      "body": null,
      "location": {
        "lat": 12.6418,
        "lng": -8.0007,
        "accuracy_m": 9,
        "name": null,
        "address": null,
        "live": true,
        "expires_at": 1795525200,
        "updated_at": 1795521640,
        "ended_at": null
      },
      "direction": "in",
      "status": "received",
      "created_at": 1795521600
    }
  }
}

Webhooks, simply

A webhook is simply us calling your server. Instead of asking every two seconds “so, did they answer?”, you give us an address, and we send the answer there as soon as it arrives. Like leaving your number instead of calling back again and again.

  1. You add a route to your serverFor example POST /enotif/webhook. It receives JSON.
  2. You paste its address in the consoleIn Webhooks, one address for test mode and one for live mode.
  3. We call it at every eventYou check the signature, you answer 200. That’s all.

The events

EventWhen
request.approvedThe person approved, or the code is right.
request.deniedThey denied (denial says how).
request.expiredNo answer in time.
request.cancelledYou cancelled the request.
request.deliveredThe person opened the request.
message.readThey read an inbox message.
message.receivedThe person wrote to you (Write from an order, a receipt, a ticket): answer.
message.updatedA live location moved, or stopped (live: false).
device.changedThey changed trusted phones. data.object = { id: "usr_…", object: "user", device_changed_at }. Up to you: ask for a confirmation again, warn them…
user.phone_changedThey changed their number (same account, same usr_…). data.object = { id: "usr_…", object: "user", phone_changed_at } — never the number.
payment.declared · payment.awaiting_confirmation · payment.succeeded · payment.failed · payment.expired · payment.cancelledA payment changed: its statuses. data.object is the payment object.
merchant.accepted · merchant.declined · merchant.endedA maison accepted or declined your conditions, or the agreement ended. data.object is the merchant object.
point_of_sale.accepted · point_of_sale.declined · point_of_sale.endedA merchant accepted or declined your invitation, or the agreement ended: its statuses. data.object is the point_of_sale object.
subscription.created · subscription.consent_requested · subscription.refused · subscription.updated · subscription.renewed · subscription.past_due · subscription.suspended · subscription.resumed · subscription.paused · subscription.canceled · subscription.cycle_opened · subscription.cycle_paid · subscription.cycle_skipped · subscription.cycle_past_dueThe life of a subscription: agreement, due dates opened, paid, skipped or late, pause, stop. data.object is the subscription or subscription_cycle object.
payment.declared · payment.awaiting_confirmation · payment.succeeded · payment.failed · payment.expired · payment.cancelledA Mobile Money or cash payment moves on. data.object is the payment object.
refund.created · refund.sent · refund.succeeded · refund.disputed · refund.cancelled · refund.expired · refund.unconfirmedA refund moves on. data.object is the refund object.
receipt.delivered · invoice.delivered · invoice.paid · invoice.partially_paid · invoice.overdueA receipt or an invoice arrived; an invoice is paid, partly paid (a deposit) or overdue.
quote.sent · quote.accepted · quote.refused · quote.expiredA quote sent, accepted, refused or expired.
card.acted · card.viewedA card was seen, or its button tapped.
ticket.delivered · ticket.viewed · ticket.scanned · ticket.used · ticket.updated · ticket.cancelled · ticket.expired · ticket.disputed · ticket.transferred · ticket.reportedThe life of a ticket: received, seen, scanned, used, transferred, cancelled.
delivery.confirmed · delivery.disputedThe proof of delivery: everything received, or something missing (quantities, reason, photo), signed by the recipient’s phone.
queue.joined · queue.near · queue.called · queue.served · queue.leftA place in a queue: taken, soon, called, served, left.
contact.delivered · contact.opened · contact.answered · contact.declined · contact.expired · intent.opened · intent.completed · intent.expiredA guaranteed contact or a pending action (/go/…) moves on.
delivery.created · delivery.out_for_delivery · delivery.delivered · delivery.disputed · network.consent.granted · network.consent.declined · network.consent.revoked · permission.revokedA delivery, a « Continue with eNotif » agreement (platforms) or a permission withdrawn.
device.linked · device.denied · device.unlinkedA screen linked from the phone, refused, then removed (Link a screen, object screen_link).
org.*What happens in an organisation’s space (tickets, parking, transport, queues, Tréso, invoices, deliveries), sent to the applications it connected.
pingThe console’s “Send a test” button.

What your server receives

POST https://your-site.com/enotif/webhook
POST /enotif/webhook HTTP/1.1
Content-Type: application/json
User-Agent: eNotif-Webhooks/1.0
X-ENotif-Event: request.approved
X-ENotif-Event-Id: evt_3NfQ8rT2LmZx9KpW4hJ6Ld
X-ENotif-Timestamp: 1791370812
X-ENotif-Signature: t=1791370812,v1=5f2b…c9

{
  "id": "evt_3NfQ8rT2LmZx9KpW4hJ6Ld",
  "object": "event",
  "type": "request.approved",
  "livemode": false,
  "created": 1791370812,
  "data": { "object": { "id": "req_7Hq2kLmN3pQrS8tUvWx1Yz", "object": "request", "status": "approved", … } }
}

Answer fast, in under 10 seconds: store the event, answer 200, and do the long work afterwards.

An organisation’s events

Your software receives what happens in your organisation’s space: a ticket sold at the counter, a car leaving the parking, a passenger boarding the bus, an invoice paid. These events all start with org. and only go to the applications the organisation connected.

  1. An application in the consoleThe organisation’s owner (or an admin) is also owner, admin or developer of the application, with the same eNotif number. The application has a webhook address.
  2. Organisation space › Connected applicationsThey pick the application, the environment (Live or Test) and the events to send.
  3. Each fact is sent onceSigned like every webhook (X-ENotif-Signature), and listed in the console’s Events. Your webhook’s own event list does not matter: the organisation’s choice is enough.

Nothing leaves without the organisation’s consent. With no connected application, no event is written. Debt acknowledgements stay between the two people: they are never sent to an organisation.

The list

EventWhendata.object
org.ticketing.soldTickets paid: cash at once, Mobile Money once confirmed.ticket_sale
org.ticketing.refundedThe sale is refunded.ticket_sale
org.ticketing.scannedA ticket got in (valid scan), once per ticket.ticket_admission
org.parking.enteredA vehicle comes in.parking_stay
org.parking.paidPaid at the entry (moment: "entry") or at the exit ("exit"), once each.parking_stay
org.parking.exitedThe vehicle leaves.parking_stay
org.transport.bookedA seat taken: counter, online, API, or moved to the next departure.transport_booking
org.transport.paidThe ticket is paid.transport_booking
org.transport.boardedThe passenger boarded (scan at the door).transport_booking
org.transport.cancelledCancelled, departure cancelled, or booking not paid in time (status: "expired").transport_booking
org.queue.takenA ticket taken: app, web, kiosk, reception, appointment.queue_ticket
org.queue.calledThe ticket is called to a counter; a recall sends called_count: 2.queue_ticket
org.queue.servedThe customer was served.queue_ticket
org.treso.approvedLast signature of the approval chain.treso_request
org.treso.paidThe receiver signed “I received it”.treso_request
org.quote.acceptedThe client accepted the quote on their phone (signed).quote
org.invoice.partially_paidA partial payment or credit note, one event per payment.invoice
org.invoice.paidThe invoice is settled.invoice
org.delivery.created · org.delivery.confirmed · org.delivery.disputedAn organisation’s delivery: created, received, or disputed by the recipient (signed).delivery

Every data.object carries organisation: { id: "org_…", name }. Amounts are strings in major units ("12500"), with currency.

Ticketing

org.ticketing.sold · org.ticketing.refunded
{
  "id": "evt_…", "object": "event", "type": "org.ticketing.sold", "livemode": true, "created": 1791370812,
  "data": { "object": {
    "object": "ticket_sale", "id": "tsl_…", "reference": "BK-7Q2M", "status": "paid",
    "event": { "id": "tex_…", "name": "Concert Sidiki" }, "category": "VIP",
    "quantity": 2, "amount": "20000", "currency": "XOF",
    "channel": "counter", "payment_method": "cash",
    "buyer": { "name": "Awa Traoré", "phone": "+22370000000" },
    "paid_at": "2026-10-14T20:15:00+00:00", "refunded_at": null, "refund_method": null,
    "organisation": { "id": "org_…", "name": "Palais de la Culture" }
  } }
}
org.ticketing.scanned
{ "object": "ticket_admission", "id": "ttk_…", "code": "K7Q2M", "sale": "tsl_…",
  "event": { "id": "tex_…", "name": "Concert Sidiki" }, "session": "tss_…", "category": "VIP",
  "position": 1, "of": 2, "holder": "Awa Traoré", "scanned_at": "2026-10-14T21:02:00+00:00",
  "organisation": { "id": "org_…", "name": "Palais de la Culture" } }

Parking

org.parking.entered · paid · exited
{ "object": "parking_stay", "id": "pks_…", "code": "P-4821", "status": "paid",
  "plate": "AB-1234-MD", "vehicle": "Car", "parking": { "id": "pkg_…", "name": "Market Parking" },
  "spot": "B12", "owner": { "name": "Moussa Keïta", "phone": "+22376000000" }, "subscriber": false,
  "moment": "exit", "amount": "500", "currency": "XOF", "payment_method": "cash", "lost_ticket": false,
  "entered_at": "2026-10-14T08:00:00+00:00", "exited_at": "2026-10-14T11:20:00+00:00",
  "organisation": { "id": "org_…", "name": "District Town Hall" } }

Transport

org.transport.booked · paid · boarded · cancelled
{ "object": "transport_booking", "id": "bkg_…", "reference": "TR-8XK2", "status": "paid",
  "departure": { "id": "dep_…", "label": "Bamako → Ségou", "from": "Bamako", "to": "Ségou", "departs_at": "2026-10-15T07:00:00+00:00" },
  "seat": 7, "passenger": { "name": "Fatou Sangaré", "phone": "+22370000001", "kind": "adult" },
  "amount": "12500", "currency": "XOF", "channel": "counter", "payment_method": "cash",
  "paid": true, "paid_at": "2026-10-14T16:00:00+00:00", "boarded_at": null,
  "cancelled_at": null, "cancel_reason": null, "refund": null, "external_ref": null,
  "organisation": { "id": "org_…", "name": "Sonef Transport" } }

For org.transport.cancelled, refund is { status, amount }.

Queues

org.queue.taken · called · served
{ "object": "queue_ticket", "id": "qtk_…", "number": "A-042", "status": "called",
  "service": { "id": "qsv_…", "name": "Withdrawals" }, "counter": { "id": "qct_…", "name": "Counter 3" },
  "channel": "kiosk", "name": null, "priority": false, "appointment": false, "called_count": 1,
  "taken_at": "2026-10-14T09:00:00+00:00", "called_at": "2026-10-14T09:12:00+00:00", "served_at": null,
  "organisation": { "id": "org_…", "name": "Sahel Bank" } }

Tréso

org.treso.approved · org.treso.paid
{ "object": "treso_request", "id": "exp_…", "kind": "advance", "title": "Sikasso mission", "status": "received",
  "project": { "id": "prj_…", "name": "Sikasso Health" }, "agent": "Moussa Keïta",
  "amount": "60000", "requested": "60000", "currency": "XOF",
  "lines": [ { "label": "Transport", "amount": "60000" } ],
  "approved_at": null,
  "paid": { "amount": "60000", "method": "mobile_money", "reference": "OM-1", "received_at": "2026-10-14T10:00:00+00:00" },
  "organisation": { "id": "org_…", "name": "Kalan NGO" } }

org.treso.approved sends approved_at and paid: null.

Quotes, invoices, deliveries

org.quote.accepted, org.invoice.partially_paid and org.invoice.paid send the API’s quote / invoice object (without user), with organisation. org.delivery.* sends the delivery object, with recipient: { name, phone } and organisation.

Check the signature

Your webhook address is public: anyone could send it a fake “approved” and sign in as someone else. The signature proves the call really comes from eNotif, and that nobody changed it on the way.

It is in the X-ENotif-Signature: t=…,v1=… header. To check it, in 3 steps:

  1. Compute it againWith your whsec_… secret (whole, prefix included): HMAC-SHA256(secret, t + "." + body), in hexadecimal. The body is the bytes received, before any JSON decoding.
  2. Compare it with v1With a constant-time comparison (hash_equals, timingSafeEqual, compare_digest), never a plain ==.
  3. Check the timeRefuse if t is more than 5 minutes off your clock: it is an old call being replayed.

Then ignore an event whose id you have already handled (still answer 200). The full code:

<?php
// The raw body, exactly as received — never json_encode(json_decode(...)).
$payload = file_get_contents('php://input');
$header  = $_SERVER['HTTP_X_ENOTIF_SIGNATURE'] ?? '';
$secret  = getenv('ENOTIF_WEBHOOK_SECRET'); // whsec_…

function enotif_verify(
    string $payload, string $header, string $secret, int $tolerance = 300
): bool {
    $t = null;
    $signatures = [];
    foreach (explode(',', $header) as $part) {
        [$key, $value] = array_pad(explode('=', trim($part), 2), 2, '');
        if ($key === 't') $t = $value;
        if ($key === 'v1' && $value !== '') $signatures[] = $value;
    }
    if ($t === null || !ctype_digit($t) || $signatures === []) return false;
    if (abs(time() - (int) $t) > $tolerance) return false;

    $expected = hash_hmac('sha256', $t . '.' . $payload, $secret);
    foreach ($signatures as $signature) {
        if (hash_equals($expected, $signature)) return true; // constant time
    }
    return false;
}

if (!enotif_verify($payload, $header, $secret)) {
    http_response_code(400);
    exit;
}

$event = json_decode($payload, true);

// Deduplicate: a retry carries the same id. A UNIQUE column makes it safe.
if (already_processed($event['id'])) {
    http_response_code(200);
    exit;
}
mark_processed($event['id']);

if ($event['type'] === 'request.approved') {
    $request = $event['data']['object']; // $request['id'], $request['user'], $request['metadata']
    // … sign the session in
}
http_response_code(200);
import crypto from 'node:crypto';
import express from 'express';

const secret = process.env.ENOTIF_WEBHOOK_SECRET; // whsec_…
const app = express();

function verify(rawBody, header, tolerance = 300) {
  let t = null;
  const signatures = [];
  for (const part of (header || '').split(',')) {
    const [key, value = ''] = part.trim().split('=', 2);
    if (key === 't') t = value;
    if (key === 'v1' && value) signatures.push(value);
  }
  if (!t || !/^\d+$/.test(t) || signatures.length === 0) return false;
  if (Math.abs(Math.floor(Date.now() / 1000) - Number(t)) > tolerance) return false;

  const expected = Buffer.from(
    crypto.createHmac('sha256', secret).update(t + '.').update(rawBody).digest('hex'),
  );
  return signatures.some((s) => {
    const given = Buffer.from(s);
    return given.length === expected.length && crypto.timingSafeEqual(given, expected);
  });
}

// express.raw: the body stays a Buffer, byte for byte.
app.post('/enotif/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verify(req.body, req.get('X-ENotif-Signature'))) return res.sendStatus(400);

  const event = JSON.parse(req.body.toString('utf8'));

  // Deduplicate: a retry carries the same id.
  if (await alreadyProcessed(event.id)) return res.sendStatus(200);
  await markProcessed(event.id);

  if (event.type === 'request.approved') {
    const request = event.data.object; // request.id, request.user, request.metadata
    // … sign the session in
  }
  res.sendStatus(200);
});
import hashlib
import hmac
import json
import os
import time

from flask import Flask, abort, request

SECRET = os.environ["ENOTIF_WEBHOOK_SECRET"].encode()  # whsec_…
app = Flask(__name__)


def verify(raw: bytes, header: str, tolerance: int = 300) -> bool:
    t, signatures = None, []
    for part in (header or "").split(","):
        key, _, value = part.strip().partition("=")
        if key == "t":
            t = value
        elif key == "v1" and value:
            signatures.append(value)
    if not t or not t.isdigit() or not signatures:
        return False
    if abs(time.time() - int(t)) > tolerance:
        return False

    expected = hmac.new(SECRET, t.encode() + b"." + raw, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(expected, s) for s in signatures)  # constant time


@app.post("/enotif/webhook")
def enotif_webhook():
    raw = request.get_data()  # the raw bytes
    if not verify(raw, request.headers.get("X-ENotif-Signature", "")):
        abort(400)

    event = json.loads(raw)

    # Deduplicate: a retry carries the same id.
    if already_processed(event["id"]):
        return "", 200
    mark_processed(event["id"])

    if event["type"] == "request.approved":
        req = event["data"]["object"]  # req["id"], req["user"], req["metadata"]
        # … sign the session in
    return "", 200

A framework that decodes the JSON before you breaks the signature: read the raw body. The secret is rolled in the console (Webhooks › Roll).

If your server does not answer

Your server is down, or it answered an error? Nothing is lost: we try again on our own, further and further apart, for almost two days.

AttemptAfter the previous one
21 minute
35 minutes
430 minutes
52 hours
66 hours
712 hours
824 hours
  • An attempt succeeds when your server answers 2xx in under 10 seconds.
  • After the last attempt, the event is marked failed. You can resend it in one click from the console (Webhooks › Resend), and GET /v1/events keeps it for 30 days.
  • So the same event may arrive twice: it keeps the same id (and the same X-ENotif-Event-Id). Store the ids already handled and ignore duplicates: a sign-in happens only once.

No public server?

Your server runs on your computer (localhost) and we cannot call it? Two ways out, with nothing to set up on our side.

Poll the request

Call GET /v1/requests/{id} every 2 seconds, until status is no longer pending. Perfect to start with; move to the webhook before going live.

Open a tunnel

A tool like ngrok gives your localhost a public address: ngrok http 8000. Paste the address it gives you in Webhooks, in test mode.

Poll until the answer — Node.js
async function waitForAnswer(id) {
  for (;;) {
    const res = await fetch(`https://enotif.sahelab.com/v1/requests/${id}`, {
      headers: { Authorization: `Bearer ${process.env.ENOTIF_SECRET_KEY}` },
    });
    const request = await res.json();
    if (request.status !== 'pending') return request; // approved, denied, expired…
    await new Promise((resolve) => setTimeout(resolve, 2000));
  }
}

Idempotency

The network drops at the wrong moment and you do not know whether the request left? Send it again with the same idempotency key: the person will not get two requests.

In practice: create a unique id (a UUID) for each sign-in attempt, put it in the Idempotency-Key header, and reuse it if you send the same attempt again.

  • The key lasts 24 hours.
  • Same key, same body: the same request comes back (a 200 response and the Idempotent-Replayed: true header).
  • Same key, another body: 409 idempotency_key_reused.

Test mode and testers

Test mode lets you try everything safely: nothing is counted, and only the people you invited receive your requests. All it takes is an sk_test_ key.

  • Testers. Invite eNotif people by their @handle (console › Testers). Once they accept the invitation in the app, they receive your test requests for real, with a “Test” banner.
  • Simulation. To any other number, nothing rings: the request is simulated (simulated: true, and simulation_reason says why). You decide it yourself, from the console or through the API:
POST /v1/sandbox/requests/{id}/approve
curl -X POST https://enotif.sahelab.com/v1/sandbox/requests/req_7Hq2kLmN3pQrS8tUvWx1Yz/approve \
  -H "Authorization: Bearer sk_test_…"

# or …/deny to simulate a denial

The webhook goes out as for real, to the test address. With an sk_live_ key, these two routes answer 403 livemode_forbidden.

Try it here POST/v1/sandbox/requests/{id}/approve

The answerAs if the person had tapped this button.
Request
The phone on the right answers.The phone below answers.

Errors

When a call fails, the answer says why, always in the same shape. message is written for a human, in French by default (in English with Accept-Language: en); your code reads type and code, which never change. An invalid amount gives parameter_invalid with param set to amount.value or amount.currency.

Error response
{
  "error": {
    "type": "invalid_request_error",
    "code": "phone_invalid",
    "message": "The number must be in E.164 format (+22370000001).",
    "param": "phone",
    "doc_url": "https://enotif.sahelab.com/docs#errors"
  }
}
HTTPtypecode
422invalid_request_errorparameter_missing, parameter_invalid, parameter_length, phone_invalid, phone_or_user, user_unknown, context_invalid, metadata_invalid, number_matching_code, url_not_allowed, code_invalid (+ attempts_remaining)
401authentication_errorapi_key_missing, api_key_invalid, api_key_revoked
402quota_errorquota_exceeded (with metric: requests, messages, payments, and limit) or feature_unavailable (with feature, e.g. cash_payments) — live mode only, when plans are on
403permission_errorapplication_suspended, account_not_approved, livemode_forbidden
404invalid_request_errorresource_missing, event_not_found, screen_link_missing
409invalid_request_errorscreen_link_not_linked, request_not_pending, request_expired, request_not_code_mode, request_code_mode, code_not_revealed, idempotency_key_reused
429rate_limit_errorrate_limited — wait Retry-After seconds

Anti-abuse limits

To protect people, an application cannot flood them with requests. Default values:

LimitValue
Pending requests, per application and per person3
Requests per application and per person10 per hour
Requests per person, all applications30 per hour
Inbox messages, per person20 per day
Attempts at a code (code mode)5

Caps also apply per IP address and per key. Beyond them: 429 rate_limited, with the Retry-After header. Too many “It’s not me” in 24 hours suspends the application in live mode, until our team has a look.

A question? Write to us.