Piaxis API Documentation

Welcome to the comprehensive Piaxis Piaxis API Documentation. This guide provides everything developers need to integrate with Piaxis’s payment platform, including escrow services, direct payments, disbursements, and webhook notifications.

Overview

The Piaxis External API enables merchants and partners to integrate payment processing, escrow services, and disbursement capabilities into their applications. Our API supports multiple payment methods across East Africa and provides robust features for secure financial transactions.

Key Capabilities: - Direct Payments: Process immediate payments via mobile money, cards, and Piaxis wallet - Escrow Services: Secure transaction management with customizable terms and conditions - Direct Disbursements: Immediate bulk payments to multiple recipients for payroll, refunds, and rewards - Escrow Disbursements: Conditional bulk payments requiring fulfillment before release - Real-time Webhooks: Instant notifications for all transaction events - Multi-currency Support: Handle transactions in UGX, USD, and other supported currencies

Getting Started: 1. Authentication & Security - Set up API authentication and security 2. Payment Processing API - Process direct payments without escrow 3. Escrow API - Implement secure escrow transactions 4. Direct Disbursements API - Process direct bulk payments to multiple recipients 5. Escrow Disbursements API - Manage conditional bulk payouts with fulfillment terms 6. Webhook Events & Integration - Handle real-time event notifications

API Documentation

Core Services

Core API Services:

Quick Links:

API Fundamentals

Base URLs

Environment

Base URL

All environments

https://{your-host}/api

Authentication Methods

The piaxis API supports multiple authentication methods depending on your use case:

Method

Use Case

Required Headers

API Key

Server-to-server integrations

api-key: YOUR_API_KEY

OAuth2

User-authorized transactions

Authorization: Bearer <token>

OTP Verification

Sensitive operations

Request OTP via POST /api/request-otp and submit it through user_info.otp or mfa_code where the route supports it

Required Headers

Baseline headers for API-key authenticated requests:

Content-Type: application/json
api-key: YOUR_MERCHANT_API_KEY
User-Agent: YourApp/1.0

Merchant-secured escrow and disbursement routes also require:

X-piaxis-Client-ID: YOUR_MERCHANT_CLIENT_ID

Store that value in your server environment as PIAXIS_CLIENT_ID. It is required on the merchant-secured route families documented under Escrows, Direct Disbursements, Escrow Disbursements, and GET /api/merchant-payments.

Required for all money-moving POST requests:

X-Idempotency-Key: unique_request_id

Recommended for server-to-server integrity, and required when your merchant profile is configured for signed requests:

X-piaxis-Timestamp: unix_timestamp_seconds
X-piaxis-Signature: sha256=<hmac_sha256>

The request signature is computed over METHOD, request path, timestamp, and the SHA256 hash of the raw JSON body, using your merchant API secret. Signed requests protect against replay and body tampering between your server and Piaxis.

Recommended for tracing:

X-Request-ID: custom_tracking_id

Supported Payment Methods

Method

Description

Countries

Processing Time

mtn

MTN Mobile Money

Uganda, Rwanda, Ghana

30-60 seconds

airtel

Airtel Money

Uganda, Kenya, Tanzania

30-60 seconds

card

Visa/Mastercard

All supported countries

5-10 seconds

piaxis_external

External piaxis Wallet

All supported countries

5-15 seconds

Supported Currencies

Code

Currency

Supported Payment Methods

UGX

Ugandan Shilling

mtn, airtel, card, piaxis_external

USD

US Dollar

card, piaxis_external

EUR

Euro

card, piaxis_external

Rate Limiting

The piaxis API implements adaptive rate limiting to protect account security, provider capacity, and platform stability. Limits are enforced per API key, client, IP/device signals, action type, and risk state; exact thresholds can change without notice.

Standard Limits

Endpoint Category

Rate Limit

Reset Period

Authentication

Adaptive

Rolling window

Payment Creation

Adaptive

Rolling window

Escrow Operations

Adaptive

Rolling window

Data Retrieval (GET)

Adaptive

Rolling window

Webhooks (outbound)

Delivery-policy based

Retry schedule

Handling Rate Limits:

When you exceed rate limits, the API returns HTTP 429 with retry information. Do not build clients around fixed thresholds; use the response guidance and retry conservatively:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Try again later.",
    "retry_after": 3600
  }
}

Response Format

Standard Response Structure

All successful API responses follow this structure:

{
  "status": "success",
  "data": {},
  "meta": {
    "request_id": "req_1234567890abcdef",
    "timestamp": "2024-01-15T10:30:00Z",
    "api_version": "2024-01-01"
  }
}

Error Response Structure

Error responses provide detailed information for debugging:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "One or more fields are invalid",
    "details": {
      "field": "amount",
      "reason": "Amount must be greater than 0"
    },
    "timestamp": "2024-01-15T10:30:00Z",
    "request_id": "req_1234567890abcdef",
    "documentation_url": "https://api.gopiaxis.com/api/docs/"
  }
}

Common Error Codes

HTTP Code

Error Code

Description

400

VALIDATION_ERROR

Request data is invalid or malformed

401

AUTHENTICATION_ERROR

API key is invalid or missing

403

AUTHORIZATION_ERROR

Insufficient permissions for this operation

404

NOT_FOUND

Requested resource does not exist

409

CONFLICT

Request conflicts with current state

429

RATE_LIMIT_EXCEEDED

Too many requests, retry later

500

INTERNAL_ERROR

Server error, contact support

502

PROVIDER_ERROR

External payment provider error

Idempotency

The piaxis API requires idempotency for money-moving request retries. Include an idempotency key on each logical POST that creates or mutates a payment, escrow, disbursement, or escrow disbursement:

POST /api/payments/create HTTP/1.1
Host: api.gopiaxis.com
Content-Type: application/json
api-key: YOUR_API_KEY
X-Idempotency-Key: unique_key_12345

Benefits: - Prevents duplicate transactions on network failures - Safe to retry failed requests - Guarantees exactly-once processing

Key Requirements: - Use unique keys for each logical request - Keys can be reused for identical retry attempts - Reusing the same key with a different endpoint or body is rejected - Keys expire after 24 hours

Pagination

List endpoints support limit/offset pagination:

Request Parameters:

GET /api/merchant-payments?limit=50&offset=0 HTTP/1.1

Response Structure:

{
  "total": 1250,
  "limit": 50,
  "offset": 0,
  "results": []
}

Testing & Development

Sandbox Environment

Use the sandbox environment for testing and development:

  • Base URL: https://sandbox.api.gopiaxis.com/api

  • Public docs: https://api.gopiaxis.com/api/docs/

  • Access: Request sandbox credentials from Piaxis before running live-flow tests

Test Credentials:

  • API Key: YOUR_SANDBOX_API_KEY

  • Client ID: YOUR_SANDBOX_CLIENT_ID

  • Webhook Secret: YOUR_SANDBOX_WEBHOOK_SECRET

Test Data

Use the sandbox numbers, cards, and webhook secrets issued for your merchant account. If a scenario requires special fixtures, prefer the examples in this documentation or the SDK sandbox guides.

Development Resources

API Integration

Official SDKs are available for the public Payment API surface:

For raw HTTP integrations or for fields not yet wrapped by the SDKs, you can also use standard HTTP clients in your preferred language:

  • Python: Use requests or httpx library

  • Node.js: Use axios or fetch

  • PHP: Use Guzzle or cURL

  • Ruby: Use HTTParty or Net::HTTP

Development Tools

  • API Reference: Available in this documentation

  • AI-friendly Markdown: /api/docs/piaxis-api-integration-guide.md

  • AI discovery file: /api/docs/llms.txt

  • Postman Collection: Contact support for access

  • OpenAPI Spec: available from protected API documentation for approved integrators

  • Testing Environment: Sandbox environment available

Example Integration

Quick Start Example

Here’s a complete example of processing a payment:

 import requests

 # 1. Create a payment
 payment_data = {
     "amount": 50000,
     "currency": "UGX",
     "payment_method": "mtn",
     "user_info": {
         "email": "[email protected]",
         "phone_number": "+256700000000",
         "name": "John Doe"
     }
 }

 response = requests.post(
     "https://api.gopiaxis.com/api/payments/create",
     json=payment_data,
     headers={
         "api-key": "YOUR_API_KEY",
         "X-piaxis-Client-ID": "YOUR_MERCHANT_CLIENT_ID",
         "X-Idempotency-Key": "payment-0001",
         "Content-Type": "application/json"
     }
 )

For merchant-secured payment, escrow, and disbursement requests, add:

.. sourcecode:: http

   X-piaxis-Client-ID: YOUR_MERCHANT_CLIENT_ID

 response.raise_for_status()

 payment = response.json()
 print(f"Payment created: {payment['payment_id']}")
 print(f"Status: {payment['status']}")
 print(f"Amount: {payment['amount']} {payment['currency']}")

Support Resources

Documentation & Guides

Developer Support

Community & Learning

Emergency Support

For critical production issues:

Include the following information in emergency requests:

  • Merchant ID

  • Transaction/Payment ID (if applicable)

  • Error messages and timestamps

  • Impact description