AlyaPay Documentation
API Integration

API Integration

Create transactions from your POS, ERP, or backend systems

API Integration

Integrate AlyaPay into your POS, ERP, or backend systems to create BNPL transactions programmatically.

When to Use

Use the API Integration when you need to:

  • Create transactions from Point of Sale (POS) systems
  • Integrate with ERP platforms
  • Automate transaction creation from backend systems
  • Build custom merchant platforms

How It Works

  1. Create Transaction - Your system calls our API to create a transaction
  2. Customer Notified - Customer receives SMS notification
  3. Customer Approves - Customer confirms payment in AlyaPay mobile app
  4. Webhook Sent - You receive webhook notification when approved
  5. Fulfill Order - Complete the order fulfillment

Base URL

EnvironmentURL
Sandboxhttps://sandbox-api.alyapay.com
Productionhttps://api.alyapay.com

All endpoints are prefixed with /api/v1/public/partner

Authentication

All API requests require an API key in the X-Api-Key header:

X-Api-Key: sk_live_xxx.yyy.....

Quick Example

curl -X POST "https://api.alyapay.com/api/v1/public/partner/transactions" \
  -H "X-Api-Key: sk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "customerPhone": "212612345678",
    "total": 500.00,
    "currency": "MAD",
    "items": [{
      "name": "Product Name",
      "reference": "ABC-123",
      "quantity": 1,
      "unitPrice": 500.00
    }],
    "vendorReference": "ORDER-2024-001"
  }'

Next Steps