Payments API
The Payments API provides access to transaction data, order management, and refund processing.
Base URL
https://api.euronsystems.com/v1/payments
Endpoints
List Transactions
GET /v1/payments/transactions
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number |
| limit | integer | Items per page |
| status | string | completed, pending, failed, refunded |
| gateway | string | razorpay, stripe, paypal |
| from | ISO date | Start date |
| to | ISO date | End date |
| student_id | string | Filter by student |
| course_id | string | Filter by course |
Response:
{
"data": [
{
"id": "txn_abc123",
"order_id": "ord_xyz789",
"student_id": "student_xyz789",
"student_name": "Priya Sharma",
"amount": 2999,
"currency": "INR",
"status": "completed",
"gateway": "razorpay",
"payment_method": "upi",
"gateway_reference": "pay_AbC123XyZ",
"items": [
{
"type": "course",
"id": "course_abc123",
"title": "Complete Python Bootcamp",
"price": 2999
}
],
"created_at": "2025-03-20T10:30:00Z"
}
]
}
Get Transaction Details
GET /v1/payments/transactions/:id
Issue Refund
POST /v1/payments/transactions/:id/refund
{
"amount": 2999,
"reason": "Student requested refund within 7-day window",
"revoke_access": true
}
Revenue Summary
GET /v1/payments/revenue
Query parameters: from, to, group_by (day, week, month).
{
"summary": {
"gross_revenue": 450000,
"refunds": 12000,
"gateway_fees": 8100,
"net_revenue": 429900,
"total_transactions": 150,
"average_order_value": 3000
}
}
Related Documentation
- Authentication — API key setup
- Courses API — Course endpoints
- Webhooks — Payment event notifications