PayVerify API

Verify Telebirr & CBE payments programmatically. Base URL https://app.verifytx.com.et/api/v1.

Build with AI

Let a coding agent do the integration. Make an agent token on the AI agents page and add the PayVerify MCP server to Claude Code, Cursor or VS Code. The agent reads these docs, creates a project, test key and webhook, writes the code and proves it with a sandbox payment.

Claude Code
claude mcp add --transport http payverify https://app.verifytx.com.et/mcp \
  --header "Authorization: Bearer pv_agent_…"

No MCP? Give your assistant /llms-full.txt (index at /llms.txt).

Authentication

Pass your project API key as a bearer token (or x-api-key header). Create keys in the dashboard; they are shown once.

Authorization: Bearer pk_live_xxxxxxxx

Responses include an x-request-id and rate-limit headers (x-ratelimit-remaining, retry-after on 429).

Test mode

Keys created as Test (pk_test_…) work against a sandbox. Their verifications and payment requests carry livemode: false, skip the monthly quota and the duplicate-transaction ledger, and are matched only by test SMS sent from the dashboard Playground — never by real bank SMS. Live keys never see test data and vice versa (404). Bank lookups stay real (read-only), and webhooks still fire so you can test your receiver; check livemode before fulfilling an order.

Create a payment request (optional)

Create an intent when you ask a customer to pay. Its timestamp anchors the REQUEST_TIME receipt-date window.

curl -X POST https://app.verifytx.com.et/api/v1/payment-requests \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"expectedAmount": 250, "providerCode": "TELEBIRR", "externalRef": "order_123"}'

What can be verified right now

A quoted amount and the payer's last digits are only ever confirmed by the bank's SMS reaching the merchant's phone. Ask which methods work before you build the pay screen — and which to build around.

curl https://app.verifytx.com.et/api/v1/capabilities -H "Authorization: Bearer $KEY"
{ "data": {
    "object": "capability_list",
    "livemode": true,
    "sms": { "connected": true, "phones": 2, "online": 0, "last_delivery_at": "..." },
    "banks": [{
      "provider": "TELEBIRR",
      "recommended_method": "transaction",
      "fallbacks": ["amount_tag", "sms_match", "receipt"],
      "methods": {
        "amount_tag": { "available": true, "reason": "no_phone_online", "detail": "..." },
        "transaction": { "available": true, "reason": "ok", "detail": null }
      }
    }]
  } }

recommended_method is the flow to build around, in the order amount_tag → sms_match → transaction → receipt (fewest customer actions first); fallbacks are the others worth keeping in reach. available: false means POST /verifications will refuse that method, with the same reason and fallbacks in error.details. available: true with a reason other than ok — a phone that has gone quiet, an unreachable bank, no receiving account — still works, just not instantly. A pk_test_ key answers simulated for the SMS methods, since the sandbox approves from simulated SMS. Phone liveness is refreshed every few minutes, so caching the answer for about a minute is plenty.

Submit a verification

Provide a transaction number, a receipt file, or both. Multipart for files; JSON for transaction-only.

curl -X POST https://app.verifytx.com.et/api/v1/verifications \
  -H "Authorization: Bearer $KEY" \
  -F "amount=250" \
  -F "providerCode=TELEBIRR" \
  -F "transactionNumber=ABC123XYZ" \
  -F "paymentRequestId=pr_..." \
  -F "externalRef=order_123" \
  -F "[email protected]"

The bank check runs inline: when it resolves you get 200 with the final decision (APPROVED / REJECTED / NEEDS_REVIEW). When a receipt still needs OCR you get 202 with a PENDING verification — the result arrives by webhook, or poll GET /api/v1/verifications/:id. Reusing an externalRef returns the original (idempotent).

Instant verify by SMS (Telebirr)

Forward the bank SMS from each of the merchant's receiving phones (dashboard: Bank SMS → Setup → Add phone) with SMSWire, or with any SMS forwarder through the custom webhook. A project can have several phones, e.g. one per bank or SIM. Then the customer pays and enters only the last 4 digits of the phone they paid from:

curl -X POST https://app.verifytx.com.et/api/v1/verifications   -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"   -d '{"amount": 250, "providerCode": "TELEBIRR", "payerLast4": "1234", "externalRef": "order_123"}'

If the bank SMS (sender 127) with that payer and amount already arrived you get 200 APPROVED (decision.source = SMS). Otherwise 202 PENDING with sms_deadline_at: poll GET /api/v1/verifications/:id or wait for the webhook. Only a unique match approves — if two pending payments share last-4 and amount, the SMS is marked ambiguous and the reason SMS_AMBIGUOUS is added. To ask the customer for nothing at all, see amount tags.

After sms_deadline_at, ask the customer for the transaction number:

curl -X POST https://app.verifytx.com.et/api/v1/verifications/<id>/transaction   -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"   -d '{"transactionNumber": "CKH8ABC12D"}'

Checked against stored bank SMS first, then the bank API — same 200/202 semantics as create. A late SMS can still approve a pending verification; the txn ledger prevents any payment being used twice. 409 invalid_state if the verification already has a txn or was decided; 422 sms_match_unavailable if SMS matching is off.

Custom webhook. POST each SMS the phone receives, as JSON or form data, with that phone's own key from Bank SMS → Setup:

curl -X POST https://app.verifytx.com.et/api/integrations/sms/<projectId> \
  -H "Authorization: Bearer pv_sms_..." -H "Content-Type: application/json" \
  -d '{"from": "127", "body": "Dear Merchant You have received ETB 250.00 ...", "received_at": "2026-11-17T07:30:00Z"}'

Apps that only take a URL can append ?key=pv_sms_... instead. Accepted names: from / sender / phoneNumber, body / text / message, optional received_at / timestamp (ISO with zone or epoch) and id. Every SMS is stored (non-bank ones as ignored) and the response is { ok, outcome }; 401 wrong key, 422 no sender or text.

Verify with nothing typed (amount tags)

The last 4 digits exist to tell two customers paying the same amount apart. Quote a different amount instead and the payment identifies itself: ask for 250.03 rather than 250.00, and the Telebirr SMS for exactly 250.03 approves that order and no other — nothing for the customer to type or read off a receipt. Turn it on under Bank SMS → Setup; it needs SMS matching on and an amount tolerance of 0.

It takes a bank whose app lets the payer enter the fraction and whose SMS prints it back — each bank declares that for itself, and Telebirr does today. Ask another bank for a quoted amount and you get 422 amount_tag_unavailable naming it.

curl -X POST https://app.verifytx.com.et/api/v1/verifications   -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"   -d '{"amount": 250, "providerCode": "TELEBIRR", "amountTag": true, "externalRef": "order_123"}'

Comes back 202 PENDING with pay_amount (250.03), amount_tag (0.03) and pay_window_ends_at. Show pay_amount exactly as returned, santim included — rounding it is what makes the payment unidentifiable again. amount stays the price; the extra santim is yours.

Create the claim when the customer picks Telebirr, not on page load: after pay_window_ends_at the quoted amount stops matching, and posting the same externalRef again quotes a fresh one. If the customer pays the plain amount, the claim lands in NEEDS_REVIEW with UNTAGGED_PAYMENT and the SMS attached, to approve in one click. The transaction-number fallback still works at any time. 503 amount_tag_unavailable means every amount near that price is spoken for — fall back to payerLast4.

Scan to pay

Typing 250.03 by hand is where a quoted amount goes wrong. Where the bank supports it, every verification and payment request carries a code the customer scans instead — the amount is already in it, so they confirm and type nothing.

{ "pay_amount": 250.03,
  "qr": {
    "payload": "hQVDUFYwMWFQTwLwUg0xNzk1NDQ5MjM4MDMx...",
    "image_url": "https://app.verifytx.com.et/qr/v1.v.ver_7h2.m4k1s.0f3a....svg",
    "amount_embedded": true,
    "expires_at": "2026-11-23T19:05:00Z" } }

image_url needs no API key and is unguessable, so it drops straight into an <img> on your checkout; payload is the same code as text if you would rather render it yourself. The image is drawn when it is fetched, so a re-quoted claim serves its new amount at the same URL, and once the verification settles the URL stops working. amount_embedded: false means the code carries no amount — keep showing pay_amount for the customer to type.

qr is null until the bank supports codes, the project has a receiving account, and the merchant has confirmed one scans (Settings → Accounts — the payload format is read off real codes, not a published spec, so we ask for one real scan before any customer sees one). Capabilities says which of those is missing. A pk_test_ key always returns a code and it always reads PAYVERIFY-TEST:…, which no bank app will pay.

Look up a transaction

Fetch a transaction straight from the provider — no matching, nothing stored. Returns the normalized payer / recipient / amount / date. For CBE, a 12-character reference needs the last 8 digits of the receiving account: pass accountSuffix, or leave it out to use your CBE receiving account.

curl -X POST https://app.verifytx.com.et/api/v1/transactions/lookup \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "TELEBIRR", "transactionNumber": "ABC123XYZ"}'

200 with the transaction; 404 not_found when the provider has no such transaction; 422 validation_error (with details.field: "accountSuffix") when a CBE reference needs the account digits and none are known; 502 provider_unreachable when the provider/relay is down.

Statuses & decisions

decision.source is SMS, BANK_API, GEMINI, or MANUAL; decision.reasons[] carries machine-readable codes (e.g. OUTSIDE_WINDOW, AMOUNT_MISMATCH, DUPLICATE_TRANSACTION).

Receipt-date window

Each project sets a window (minutes), a reference point (TODAY or REQUEST_TIME), and a direction. A receipt dated outside the window is routed to manual review instead of auto-approving — configure it in project settings.

Webhooks

Set a webhook URL in project settings to receive verification events: verification.approved, verification.rejected, verification.needs_review. Deliveries retry with backoff.

sms_availability.changed also fires when instant verification from bank SMS starts or stops working for the project: data.state is live, degraded (phones set up, none reachable) or off (none set up). Switch the checkout to a transaction number while it isn't live. Trouble is sent at once, a recovery once it has held for ten minutes, and never for test mode.

Each request carries X-PayVerify-Event, X-PayVerify-Delivery, and a signed X-PayVerify-Signature: t=<unix>,v1=<hmac>. Verify it with your webhook secret:

import crypto from "node:crypto";

export function verifyPayVerifySignature(rawBody, header, secret, toleranceSec = 300) {
  if (!header) return false;
  const parts = Object.fromEntries(header.split(",").map((p) => p.trim().split("=", 2)));
  const t = Number(parts.t);
  if (!parts.v1 || !Number.isFinite(t)) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  const given = Buffer.from(parts.v1, "hex");
  return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}

Use the raw request body, reject timestamps older than 5 minutes, and dedupe on X-PayVerify-Delivery (the same across retries). A webhook.test event (from the AI agents tools) should get a 2xx and be ignored.

Rate limits & quotas

Requests are rate-limited per API key (429 with Retry-After + X-RateLimit-* headers), capped by your plan. Your account's plan sets a monthly live-verification limit shared by all your projects — exceeding it returns 402 quota_exceeded; creating more projects or keys than it allows returns 402 plan_limit_reached, and a method the plan doesn't include returns 402 plan_feature_unavailable. Test keys are exempt.

Errors

Errors return { error: { code, message, request_id } }. Branch on code; quote request_id in support.

The two *_unavailable codes mean the method can't work for this project right now, not that the request was malformed. Their details carry { reason, method, provider, fallbacks } — submit again with one of the fallbacks, and see capabilities to choose up front.

unauthorized / invalid_api_key401Missing/invalid/revoked key
rate_limited429Too many requests
quota_exceeded402Plan's monthly verification limit reached
plan_limit_reached / plan_feature_unavailable402Plan limit or feature (see details)
account_suspended / project_suspended403Suspended by PayVerify
validation_error422Bad/missing fields (see details)
not_found404Resource not in your project
provider_unreachable502Bank provider/relay unreachable
invalid_state409Verification already has a txn / decided
external_ref_conflict409externalRef already used in the other mode
sms_match_unavailable422SMS matching off, no forwarding phone, or bank can't be matched
amount_tag_unavailable422 / 503Quoted amounts unavailable here / no unique amount free
unsupported_media_type415Use multipart or JSON
internal500Server error — retry / contact support