Bitika API

Bitcoin payments, in a few lines

Accept M-Pesa or Airtel Money and settle your users in Bitcoin over the Lightning Network — starting at KES 10. One API key, no custody.

collect.js
// 1. Send the user an OTP
await fetch("https://api.bitika.xyz/api/v1/auth/sms/send", {
  method: "POST",
  headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ phone: "254712345678" }),
});

// 2. Charge M-Pesa → settle Bitcoin to a Lightning address
const res = await fetch("https://api.bitika.xyz/api/v1/xwift/collect", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    amount: "100",                 // KES
    phone: "254712345678",
    lightningAddress: "user@walletofsatoshi.com",
    verificationCode: 123456,      // the OTP the user received
  }),
});
// → { transaction_code, status: "processing" }

What you need

Four things to move your first shilling into sats.

An API key

Create an account below and get a bk_test_ key instantly. No signing, no OAuth — send it as a Bearer token.

A phone number

Canonical 254XXXXXXXXX (M-Pesa / Airtel). One OTP confirms the user owns it.

A Lightning address

Where the sats settle, e.g. user@walletofsatoshi.com. Or pass a BOLT11 invoice.

An Idempotency-Key

A UUID per payment so retries never double-charge.

Built for production

Non-custodial

Sats settle straight to the user’s wallet. We never hold customer funds.

From KES 10

Micro-payments work. Max KES 10,000 per transaction. Flat 3% fee.

Test & live keys

bk_test_ sandbox instantly; bk_live_ after a quick verification + approval.

Realtime webhooks

Get a signed callback on every status change — no polling. Verify with your secret.

Lightning-fast

M-Pesa in, Bitcoin out over Lightning — settlement in seconds.

Scoped & rate-limited

Per-key scopes, IP allowlists, and rate limits keep integrations safe.

Start with a test key

Instant sandbox key, no card, no wait. Go live after a quick verification.

Create your account