GatewayCore
CIPHERPAY · REST API v1

Build Payments Into
Anything You Create

The Cipherpay Gateway API gives you programmatic access to Mobile Money collections, bulk payouts and SACCO ledger data. RESTful, predictable and developer-friendly.

REST JSON HTTPS Webhooks MTN MoMo Airtel Money PHP SDK
QUICK START

Integrate in Under 10 Minutes

Get your API key from your Merchant dashboard, make your first test request to our sandbox, then flip to live mode when you're ready.

1
Register as a Merchant

Create a Merchant account at no cost. Sandbox access is instant.

2
Copy Your API Key

Find your x-api-key in Settings → API Keys. Keep it secret — never expose it in frontend code.

3
Make Your First Call

POST to /api/v1/collect with your key and a phone number to initiate a test collection.

4
Handle Webhooks

Configure a webhook URL to receive real-time payment status callbacks to your server.

// Initiate a Mobile Money collection
POST https://shashura.com/api/v1/collect
Content-Type: application/json
x-api-key: sk_live_••••••••••••••••

{
  "phone":    "256771234567",
  "amount":   5000,
  "currency": "UGX",
  "reason":   "Order #INV-1042 payment",
  "ref":      "INV-1042"
}

// Response
{
  "status":      "PENDING",
  "txn_id":     "TXN_84f2a1c3...",
  "message":    "Payment prompt sent to 256771234567",
  "expires_at": "2025-03-17T14:35:00Z"
}

API Endpoints

All requests go to https://shashura.com/api/v1/ with your x-api-key header.

Collections
POST https://shashura.com/api/v1/collect Initiate a mobile money collection from a customer
GET https://shashura.com/api/v1/collections List all collections with pagination and filters
GET https://shashura.com/api/v1/collection/{id} Get a single collection by ID
Payouts
POST https://shashura.com/api/v1/payout Send money to a single mobile wallet
POST https://shashura.com/api/v1/bulk-payout Batch payouts (up to 500 recipients per call)
GET https://shashura.com/api/v1/payouts List payout history
Transactions
GET https://shashura.com/api/v1/transaction/{id} Get full transaction detail and status
GET https://shashura.com/api/v1/transactions Search transactions by date, status, phone or ref
Webhooks
POST https://shashura.com/api/v1/webhook/register Register or update your callback URL
GET https://shashura.com/api/v1/webhook/logs View recent webhook delivery logs
POST https://shashura.com/api/v1/webhook/retry/{id} Retry a failed webhook delivery
WEBHOOKS

Real-Time Payment Callbacks

Instead of polling for status, register a webhook URL and we'll POST the payment result to your server the moment it's confirmed — usually within seconds.

payment.completed Customer successfully paid
payment.failed Payment attempt failed or timed out
payout.completed Payout delivered to recipient wallet
payout.failed Payout could not be delivered
Webhook Payload — payment.completed
{
  "event":       "payment.completed",
  "txn_id":     "TXN_84f2a1c3abc",
  "ref":         "INV-1042",
  "amount":      5000,
  "currency":    "UGX",
  "phone":       "256771234567",
  "network":     "MTN",
  "paid_at":     "2025-03-17T14:31:22Z",
  "merchant_ref": "your_internal_id",
  "signature":   "sha256=abc123..."
}
Always verify the signature header by computing HMAC-SHA256 of the raw request body with your webhook secret. Never trust unsigned webhooks.

HTTP Status Codes

We use standard HTTP status codes throughout the API.

200
OK

Request succeeded. Check the response body for details.

201
Created

Resource created (e.g. new transaction initiated).

400
Bad Request

Missing or invalid parameters. Check the error message.

401
Unauthorized

Missing or invalid API key. Check your x-api-key header.

403
Forbidden

API key valid but you lack permission for this action.

429
Too Many Requests

Rate limit exceeded. Retry after the time in Retry-After header.

500
Server Error

Unexpected error on our end. We are notified automatically.

Need help integrating?

Our developer support team responds within 2 business hours. Email us or check the Merchant Portal for live API logs.