Get Payment by Reference

Retrieve detailed information about a specific payment using its unique reference.

Endpoint

GET /api/paiements/reference/:reference

Path Parameters

referencerequiredstring
The unique payment reference (e.g., PAY_REF_123456789)

Example Request

GET /api/paiements/reference/PAY_REF_123456789
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",
    "items": [
      {
        "name": "Wireless Headphones",
        "quantity": 1,
        "price": 1000
      }
    ]
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:35:00Z",
  "organization_id": "org_789",
  "api_key_id": "key_101"
}

Error Responses

404 Error Example

{
  "statusCode": 404,
  "message": "Payment with reference PAY_REF_123456789 not found",
  "error": "Not Found"
}

401 Error Example

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

403 Error Example

{
  "statusCode": 403,
  "message": "You don't have permission to access this payment",
  "error": "Forbidden"
}