Get started

Quickstart

Go from a new Deripay account to a first deposit and a verified webhook.

This guide takes you from a new account to a first deposit. Every call is made from your server. There is no sandbox, so use a small amount on an account you control.

1. Create an account

Register at deriapi.site/register and sign in to the dashboard.

2. Register your Deriv app

Create an OAuth app on developers.deriv.com with the scopes trade account_manage payment and an https redirect URI on your site. Deriv gives you a client ID made of letters and digits.

In the Deripay dashboard, open Deriv apps and add that client ID, your redirect URI and your site domain. Legacy numeric Deriv App IDs are rejected. Details are in Deriv OAuth.

3. Create an API key

Open API keys, create a key and tick the scopes you need. For this guide tick all four: connections, deposits, withdrawals and read. The secret is shown once. Store it in your server environment:

bash
export DERIPAY_API_KEY="dpk_live_…"

Never put the key in browser code, a mobile app or a public repository.

4. Check the key

bash
curl https://deriapi.site/api/v2/ping \
  -H "Authorization: Bearer $DERIPAY_API_KEY"
json
{
  "success": true,
  "data": {
    "ok": true,
    "developer_id": "6720a0b1c2d3e4f5a6b7",
    "key_prefix": "dpk_live_1a2b3c4d5e6f",
    "api_version": "v2",
    "deripay_reachable": true,
    "time": "2026-11-03T09:00:00.000Z"
  }
}

5. Connect a customer

Run the Deriv OAuth flow on your backend (see Deriv OAuth). When you have the customer's Deriv access token, create a connection. A personal access token with the same scopes works too:

bash
curl https://deriapi.site/api/v2/connections \
  -H "Authorization: Bearer $DERIPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "YOUR_DERIV_CLIENT_ID",
    "deriv_access_token": "DERIV_ACCESS_TOKEN",
    "token_expires_in": 3600,
    "external_customer_id": "user_1842"
  }'

Save data.id (for example con_6720f1a2b3c4d5e6f7a8) against your customer.

6. Check the market and limits

bash
curl "https://deriapi.site/api/v2/rates?country=KE" \
  -H "Authorization: Bearer $DERIPAY_API_KEY"

Use an amount between data.deposit_limits.min and data.deposit_limits.max. If data.deposits_available is false, deposits are paused in that market.

7. Make a first deposit

bash
curl https://deriapi.site/api/v2/deposits \
  -H "Authorization: Bearer $DERIPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: dep_user_1842_order_0001" \
  -d '{
    "connection_id": "con_6720f1a2b3c4d5e6f7a8",
    "country": "KE",
    "amount": 500,
    "phone_number": "0712345678"
  }'

The response is a transaction with state: "pending". In Kenya the customer gets an M-Pesa prompt on their phone. When they approve it, the transaction moves to processing and then completed.

Check it at any time:

bash
curl https://deriapi.site/api/v2/transactions/txn_6720f9e8d7c6b5a4f3e2 \
  -H "Authorization: Bearer $DERIPAY_API_KEY"

8. Receive the webhook

Open Webhooks in the dashboard, add an https URL on your server and copy the signing secret:

bash
export DERIPAY_WEBHOOK_SECRET="whsec_…"

Press Send test event to check your endpoint. Then verify every delivery as shown in Webhooks. When the deposit finishes you receive transaction.updated and transaction.completed.

Next steps