Skip to content

Session Status

Query the current status of an existing payment session. Use this to verify payment state, especially if a callback was not received.

Endpoint

http
GET https://api.spayon.io/api/product/session/{session_id}
Authorization: Bearer YOUR_BEARER_TOKEN
http
GET http://staging-spayon-api.eu-north-1.elasticbeanstalk.com/api/product/session/{session_id}
Authorization: Bearer YOUR_BEARER_TOKEN

Example Request

http
GET /api/product/session/4ae3108a-3a1c-42df-bce9-503bbd70ab24
Authorization: Bearer YOUR_BEARER_TOKEN

Response

json
{
  "sessionId": "4ae3108a-3a1c-42df-bce9-503bbd70ab24",
  "status": "failed",
  "productName": "Iphone 16S",
  "price": "10",
  "currency": "AMD",
  "createdAt": "2025-06-11T17:02:51.118Z",
  "updatedAt": "2025-06-11T17:03:15.202Z",
  "orderId": "ORDER_123456"
}

Status Values

StatusDescription
paidPayment completed successfully
pendingPayment is still being processed
failedPayment failed or was declined
expiredSession has expired (15-minute timeout)

Response Codes

Status CodeDescription
200 OKStatus retrieved successfully
401 UnauthorizedInvalid or expired Bearer Token
404 Not FoundSession ID not found

TIP

This endpoint is useful for reconciliation but should not replace callbacks as the primary payment notification mechanism. Always implement the callback flow.