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
- Create Transaction - Your system calls our API to create a transaction
- Customer Notified - Customer receives SMS notification
- Customer Approves - Customer confirms payment in AlyaPay mobile app
- Webhook Sent - You receive webhook notification when approved
- Fulfill Order - Complete the order fulfillment
Base URL
| Environment | URL |
|---|---|
| Sandbox | https://sandbox-api.alyapay.com |
| Production | https://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
- Authentication - Learn about API keys
- Create Transaction - Create transactions
- Get Transaction - Check transaction status
- Webhooks - Receive real-time updates