jayb.ke
Jayb for Developers • REST API v1 • JavaScript SDK

Modern payments infrastructure. Built for African rails & global clearing.

Embed unified African mobile money, international cards, and bank wires in minutes. A 2-line JavaScript drop-in modal, turnkey recurring billing with automated SMS warnings, HMAC-SHA256 signed webhooks, and multi-tenant developer sandbox isolation.

< 18 KB
Gzipped SDK Size
99.98%
Core Rail Uptime
HMAC
SHA-256 Signatures
checkout.html
Drop-in SDK v1.2
<!-- 1. Include the Jayb Checkout SDK -->
<script src="https://jayb.ke/widget.js"></script>

<!-- 2. Trigger checkout on user click -->
<script>
  JaybCheckout.open({
    sessionToken: "chk_live_901824_x9",
    onSuccess: (data) => {
      console.log("Payment completed:", data.reference);
      window.location.href = "/order/success";
    },
    onCancel: () => console.log("Checkout dismissed")
  });
</script>
POST /api/v1/checkout/sessions 201 Created
{ "token": "chk_live_...", "rails": ["mpesa", "waafi", "card"] }
Embeddable Client SDK

Drop-in checkout modal: Two lines of JavaScript to accept any rail

Eliminate weeks of frontend development. Our lightweight, zero-dependency widget provides an optimized, branded payment experience for mobile and web.

โšก

Zero Dependency • <18 KB

Zero React/Vue bloat. Plain JavaScript loaded asynchronously with fallback to redirect URLs for legacy browser environments.

Asynchronous Load • Zero Impact on CWV / LCP
๐Ÿ“ฑ

Telco & Carrier Auto-Detection

The modal detects phone number prefixes (e.g. +254 7xx → Safaricom M-Pesa, +252 61 → Hormuud EVC+, +251 9 → Telebirr) and displays the native PIN prompt instructions.

Auto-Format • Prefix Validation
๐ŸŽจ

Full CSS Brand Customization

Pass CSS variables (primary accent color, border radius, merchant logo) directly to match your application's brand identity seamlessly.

Custom Colors • White-Label Styling
Pluggable Payment Gateway Architecture

One clean REST API for 30+ countries, mobile money & bank wires

Stop writing custom code for every telco API and aggregator. Jayb standardizes payloads, authentication, and error codes across all African payment methods and global cards.

Normalized Server Protocol

Initiate collections with one POST request

Send the customer's phone number or email and amount. Jayb resolves the carrier route, performs currency normalization, checks fee coverage toggles, and dispatches the prompt.

East Africa Mobile Money M-Pesa, EVC+, Zaad, eDahab
Horn of Africa • Ethiopia Telebirr • CBE Birr
Pan-African Rails (30+ Countries) NGN, GHS, ZAR, EGP & more
Global Cards & High-Value Wires Visa, MC, Fedwire, ACH, SEPA
Server-to-Server Request cURL
curl -X POST https://jayb.ke/api/v1/checkout/sessions \
  -H "Authorization: Bearer jayb_live_sk_8910..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000.0,
    "currency": "KES",
    "reference": "INV-9028",
    "customer_phone": "+254712345678",
    "payment_method": "mpesa",
    "cover_fees": true
  }'
Turnkey Recurring Orchestration

Solve mobile money PIN failures with intelligent pre-charge SMS warnings

Unlike credit cards that charge invisibly, mobile money recurring subscriptions require the user to enter their PIN on their phone screen. Jayb's notification scheduler prevents surprise cancellations.

1

10-Minute Advance SMS Notice

Before dispatching the STK prompt, Jayb sends an automated SMS: "Hello {{name}}! Your monthly {{title}} renewal of KSh {{amount}} is scheduled in 10 minutes. Please enter your PIN when prompted."

Custom Sender ID Supported
2

Scheduled STK Prompt Dispatch

Prompts fire precisely when expected. The user's phone lights up ready for their 4-digit PIN with near-instant confirmation.

92% First-Prompt Completion
3

1-Click Token Recovery Links

If the payer's phone was offline or busy, Jayb dispatches a secure 1-click payment link: jayb.ke/checkout/recover/tok_89... allowing them to pay immediately without logging in.

Zero Churn • Automated Dunning
Fee Economics & Flexibility

Programmatic customer fee coverage engine

Decide how fees are absorbed dynamically per transaction or configured globally in your app portal settings.

Mode: Optional

Payer Chooses (+2.5%)

Presents a clear toggle checkbox in the checkout modal. Over 74% of donors and clients willingly cover transaction fees to ensure the merchant receives 100%.

fee_settings.mode = "optional"
Mode: Mandatory

Always Added to Total

Automatically calculates and tacks on the exact platform processing fee to the base invoice total, completely protecting your merchant margin.

fee_settings.mode = "mandatory"
Mode: Disabled

Merchant Absorbs All Fees

Customers pay only the exact price shown on the page. Processing fees are seamlessly subtracted from your merchant balance upon settlement.

fee_settings.mode = "disabled"
Security • Cryptographic Signatures

Real-time webhooks with HMAC-SHA256 replay protection

Never rely on untrusted client callbacks. Jayb delivers server-to-server webhook events signed cryptographically so your backend can safely unlock digital goods or reconcile orders.

๐Ÿ”

HMAC-SHA256 Signature Header

Every webhook includes X-Jayb-Signature generated using your secret key. Verifies the event originated from Jayb without man-in-the-middle tampering.

โฑ๏ธ

Timestamp Replay Protection

Includes X-Jayb-Timestamp header. Prevents replay attacks by enforcing a strict 5-minute validation tolerance window on incoming payloads.

๐Ÿ”

Exponential Backoff Retries

If your server returns anything other than HTTP 200, Jayb retries up to 10 times over 24 hours with exponential backoff and portal delivery logs.

Developer Dashboard & Sandbox

Instant keys, isolated sandboxes & 1-click rotation

Everything you need to test, configure, and monitor live payment throughput is built into our multi-tenant Client Portal.

๐Ÿ”‘

Instant Key Rotation

Rotate API keys and webhook secrets immediately from your developer portal if credentials are compromised.

๐Ÿ›ก๏ธ

KYC Document Verification

Upload Certificate of Incorporation, CR12, and Director IDs directly through a streamlined compliance pipeline.

๐Ÿ“Š

Time-Filterable Analytics

Filter payment performance, fee absorption rates, and channel breakdowns by day, week, month, or YTD.

๐Ÿงช

End-to-End Test Rails

Test complete payment lifecycles, webhook responses, and simulation prompts without spending real money.

Build on Jayb in under 10 minutes

Sign up for free, create your first client application, and start accepting payments with our drop-in SDK today.