Integrate Kerypto into your app. Enable your users to buy and sell crypto with M-Pesa directly from your platform.
1. Get a quote
2. Initiate a swap
{
"direction": "onramp",
"fiatAmount": 5000,
"tokenSymbol": "USDC",
"chain": "BASE",
"phoneNumber": "254712345678",
"walletAddress": "0x742d35Cc..."
}3. Track status
All webhook payloads include an HMAC-SHA256 signature in theX-Kerypto-Signatureheader. Verify this against your webhook secret.
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Live Key
krp_live_••••••••••••••••Test Key
krp_test_sk_1a2b3c4d5e6f7g8hTokens
Chains