API Operational
v1.0.0 Production

KashLink Escrow Engine

Embed secure peer-to-peer escrow payments directly into your software. Automate payouts, secure funds, and request instant fee structures with a robust, low-latency API.

Core Endpoints

POST
https://api.kash-link.com /v1/checkout/initialize

Creates a secure transaction session and returns a checkout link where buyers confirm payment. Requires bearer token authentication with your API Secret Key.

curl -X POST https://api.kash-link.com/v1/checkout/initialize \ -H "Authorization: Bearer kash_sec_live_..." \ -H "Content-Type: application/json" \ -d '{ "product_name": "Leather Sofa", "amount": 25000, "description": "Premium brown leather couch", "success_url": "https://yoursite.com/success", "cancel_url": "https://yoursite.com/cancel" }'
const response = await fetch('https://api.kash-link.com/v1/checkout/initialize', { method: 'POST', headers: { 'Authorization': 'Bearer kash_sec_live_...', 'Content-Type': 'application/json' }, body: JSON.stringify({ product_name: 'Leather Sofa', amount: 25000, description: 'Premium brown leather couch' }) }); const data = await response.json(); console.log(data.checkout_url);
import requests url = "https://api.kash-link.com/v1/checkout/initialize" headers = { "Authorization": "Bearer kash_sec_live_...", "Content-Type": "application/json" } payload = { "product_name": "Leather Sofa", "amount": 25000, "description": "Premium brown leather couch" } response = requests.post(url, json=payload, headers=headers) checkout_url = response.json().get("checkout_url") print(checkout_url)
GET
https://api.kash-link.com /v1/fees

Retrieves the active fee tiers. Helps developers display accurate KashLink fees (processing & withdrawal) in their checkouts before initialization.

curl -X GET https://api.kash-link.com/v1/fees
const response = await fetch('https://api.kash-link.com/v1/fees'); const fees = await response.json(); console.log(fees);
import requests response = requests.get("https://api.kash-link.com/v1/fees") fees = response.json() print(fees)

The P2P Escrow Lifecycle

KashLink API handles the financial and trust layers automatically. Here is how integrations capture and disburse escrowed transactions:

1. Initialize

Call the API to initialize a checkout. Direct your buyer to the secure payment sheet link returned.

2. Escrow Held

Buyer pays via M-Pesa. Funds are safely secured. The API fires a transaction.escrow_held webhook.

3. Releasing Payout

Once delivery is verified, funds are released to the vendor. KashLink fires transaction.completed.