Skip to content

Retrieve a session.

GET
/v1/sessions/{sessionId}
curl --request GET \
--url https://api.ridleypay.com/v1/sessions/cs_a1b2c3d4e5f6g7h8 \
--header 'Authorization: Bearer <token>'

Returns details about a specific checkout session, including its current status if a payment has been initiated.

sessionId
required
string

The session ID.

Example
cs_a1b2c3d4e5f6g7h8

Session found

Media typeapplication/json
object
data
object
id
string
type
string
attributes
object
amount
number
currency
string
reference
string
status
string
payment_id
string
nullable
expires_at
string
links
object
self
string
Example
{
"data": {
"id": "cs_a1b2c3d4e5f6g7h8",
"type": "sessions",
"attributes": {
"amount": 99.99,
"currency": "USD",
"reference": "WOO-123",
"status": "pending",
"payment_id": null,
"expires_at": "2026-03-05T12:00:00.000000Z"
},
"links": {
"self": "https://pay.example.com/api/v1/sessions/cs_a1b2c3d4e5f6g7h8"
}
}
}

Session expired or not found

Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "404",
"title": "Not Found",
"detail": "Session not found or expired."
}
]
}