Retrieve a session.
GET
/v1/sessions/{sessionId}
const url = 'https://api.ridleypay.com/v1/sessions/cs_a1b2c3d4e5f6g7h8';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”sessionId
required
string
The session ID.
Example
cs_a1b2c3d4e5f6g7h8Responses
Section titled “ Responses ”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
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." } ]}