Skip to main content

Get All Purchases

Retrieve all purchase transactions with optional filtering by status.

Authentication

string
required
Bearer token with admin role required

Query Parameters

string
Filter purchases by status. Available values:
  • created - Purchase record created but payment not initiated
  • pending - Payment in progress
  • completed - Payment successful and enrollment confirmed
  • failed - Payment failed
  • refunded - Purchase refunded
  • all - Returns all purchases regardless of status (default)

Response

boolean
Indicates if the request was successful
array
Array of purchases sorted by creation date (newest first)

Example Requests

Notes

  • Purchases are sorted by creation date in descending order (newest first)
  • The amount field represents the final price after any discounts applied
  • Revenue calculations should only include purchases with status: 'completed'
  • The courseId field is populated with basic course information (ID and title)
  • If no status query parameter is provided or status=all, all purchases are returned
  • Currency defaults to ‘INR’ (Indian Rupee) for all transactions