Deripay handbook.
Deripay is a payment gateway for Deriv third-party sites. It lets your users deposit and withdraw to/from their Deriv account using M-Pesa, with no licensing or direct payment-agent integration on your side.
Integrate with one prompt.
Paste a single prompt into Claude / Cursor / Codex / Copilot — your AI scans the codebase, places the Cashier button, builds the deposit + withdrawal modal, and verifies itself before handing back.
Quickstart
Register your Deriv app, get a Deripay key, verify your domain, make your first call. Under 10 minutes.
API reference
Every /api/v1 endpoint — request shapes, examples, error codes.
Webhooks
Signed HTTP callbacks for terminal-state transitions.
Troubleshooting
Common errors decoded — token/app_id binding, missing scopes, signature failures, webhook delivery.
How it works
- Your user clicks “Deposit” on your site. Your frontend collects their M-Pesa phone + USD amount and sends it (with their Deriv token) to your server.
- Your server signs the request with your Deripay API key and POSTs to
/api/v1/deposit. - Deripay authorizes a session with the user's Deriv account, requests an M-Pesa STK push, and credits their Deriv account when the user completes the prompt.
- Your server polls
/api/v1/transactions/:id(or receives a webhook) to know when the deposit is complete.
Pricing
Deripay charges a small spread on the FX rate (USD ↔ KES). Of that margin, 22% is paid to you as the integrating developer. No per-transaction fees, no monthly minimums.