DRAVPAY developer resources / Quickstart

Prepare a website payment integration.

A practical starting point for developers adding payment collection to an ecommerce store, NGO, or other website.

Before you begin

Identify your website, organization, payment collection needs, preferred checkout experience, and intended payout destinations. For institutional transfers, note the SACCO systems and partner rails involved.

Use the test environment at https://test.dravpay.dravtech.online while building. Do not send real customer, member, wallet, or payment data to the test environment.

Configuration shape

Keep the base URL and credentials in your own secure configuration. Switch to the live host when you go to production.

Environment configuration
# Test
DRAVPAY_API_BASE_URL=https://test.dravpay.dravtech.online
# Live
# DRAVPAY_API_BASE_URL=https://api.dravpay.dravtech.online
DRAVTECH_API_TOKEN=replace-with-a-provisioned-token

Create a payment request

Send a unique idempotency key with each payment request so retries are handled safely.

HTTP
curl -X POST "$DRAVPAY_API_BASE_URL/api/v1/payment-intents" \
  -H "Authorization: Bearer $DRAVTECH_API_TOKEN" \
  -H "Idempotency-Key: <unique-request-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "250.00",
    "currency": "KES",
    "recipient": "<partner-defined-reference>"
  }'