Skip to main content

ChainPal Developer API

Welcome to the ChainPal Developer API documentation. ChainPal provides a RESTful API that enables businesses to accept cryptocurrency payments and receive automatic settlement in local fiat currency.

Base URL

All API requests are made to:
https://api.chainpal.org/api/v1

How It Works

  1. Initialize a Payment - Create a payment session with the amount and customer details
  2. Redirect Customer - Send your customer to the hosted checkout page
  3. Customer Pays - Customer selects their preferred cryptocurrency and completes payment
  4. Automatic Settlement - We convert the crypto and settle directly to your bank account
  5. Webhook Notification - Receive real-time updates about payment status

Core Capabilities

  • Multi-Token Support: Accept payments in USDT and USDC
  • Multi-Network Support: Support for Base, Celo, Polygon, and BSC networks (varies by country)
  • Automatic Conversion: Crypto payments are automatically converted to local fiat currency
  • Direct Settlement: Funds settle directly to your registered bank account
  • Real-time Webhooks: Receive instant notifications when payment status changes

Supported Countries

ChainPal currently supports merchants in:
CountryCurrencySettlement
NigeriaNGNBank Transfer
GhanaGHSBank Transfer
KenyaKESBank Transfer
South AfricaZARBank Transfer

API Resources

  • Authentication - API key types and authentication methods
  • Payments - Create and manage payment sessions
  • Quote - Get real-time conversion quotes
  • Checkout - Hosted checkout page endpoints
  • Webhooks - Event notifications and signature verification
  • Types & Enums - Supported tokens, networks, and status values
  • Errors - Error codes and handling

Environments

ChainPal provides two environments for development and production:
EnvironmentDescriptionKey Prefix
TestFor development and testing. Uses testnet networks.cp_pk_test_, cp_sk_test_
LiveFor production. Real transactions and settlements.cp_pk_live_, cp_sk_live_

Quick Start

# Initialize a payment
curl -X POST https://api.chainpal.org/api/v1/payments \
  -H "Authorization: Bearer cp_pk_test_your_public_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "customerEmail": "[email protected]"
  }'
Response:
{
  "success": true,
  "message": "payment initialized successfully",
  "data": {
    "paymentId": "507f1f77bcf86cd799439011",
    "paymentURL": "https://pay.chainpal.org/c/abc123xyz"
  }
}

Support