Get Payments by Organization

Retrieve a paginated list of payments for the authenticated organization.

Endpoint

GET /api/paiements/organisations

Query Parameters

pagenumber
Page number (starts from 0)
sizenumber
Number of items per page
transaction_typestring
Transaction type filterAllowed values:
  • PAYMENT
  • DIRECT_PAYMENT
  • TRANSFERT
  • RECHARGE
statusstring
Payment status filterAllowed values:
  • INIT
  • PENDING
  • COMPLETE
  • FAILED
  • TIMEOUT
dateFromnumber
Start date timestamp (Unix timestamp)
dateTonumber
End date timestamp (Unix timestamp)

Example Request

GET /api/paiements/organisations?page=0&size=20&transaction_type=PAYMENT&status=COMPLETE&dateFrom=1704067200&dateTo=1706745600
X-API-Key: sk_test_your_api_key_here

Response

Response Body Example

[
  {
    "id": "payment_123",
    "reference": "PAY_REF_123456789",
    "amount": 1000,
    "description": "Payment for order #123",
    "status": "COMPLETE",
    "transaction_type": "PAYMENT",
    "phone": null,
    "service_mobile_code": null,
    "extra_data": {
      "order_id": "123",
      "customer_id": "456"
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:35:00Z",
    "organization_id": "org_789",
    "api_key_id": "key_101"
  },
  {
    "id": "payment_124",
    "reference": "DIRECT_PAY_REF_987654321",
    "amount": 2500,
    "description": "Direct mobile payment",
    "status": "PENDING",
    "transaction_type": "DIRECT_PAYMENT",
    "phone": "+2250102030405",
    "service_mobile_code": "ORANGE_CI",
    "extra_data": {
      "callback_url": "https://merchant.com/callback"
    },
    "createdAt": "2024-01-16T14:20:00Z",
    "updatedAt": "2024-01-16T14:20:00Z",
    "organization_id": "org_789",
    "api_key_id": "key_101"
  }
]

Pagination Metadata

{
  "data": [], // Array of payments
  "total": 150,
  "page": 0,
  "size": 10,
  "totalPages": 15
}

Error Responses

401 Error Example

{
  "statusCode": 401,
  "message": "Invalid or missing API key",
  "error": "Unauthorized"
}

403 Error Example

{
  "statusCode": 403,
  "message": "Forbidden resource",
  "error": "Forbidden"
}