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.

Optional but Recommended:

X-Idempotency-Key: unique_request_id
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 rate limiting to ensure fair usage and system stability:

Standard Limits

Endpoint Category

Rate Limit

Reset Period

Authentication

100 requests/hour

Rolling hour

Payment Creation

1,000 requests/hour

Rolling hour

Escrow Operations

500 requests/hour

Rolling hour

Data Retrieval (GET)

5,000 requests/hour

Rolling hour

Webhooks (outbound)

No limit

N/A

Rate Limit Headers

All API responses include rate limiting information:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1642694400
X-RateLimit-Retry-After: 3600

Handling Rate Limits:

When you exceed rate limits, the API returns HTTP 429 with retry information:

{
  "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 supports idempotency for safe request retries. Include an idempotency key in your requests:

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 - 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: /openapi.json endpoint on API server

  • 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",
         "Content-Type": "application/json"
     }
 )

For merchant-secured 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