Skip to main content
GET
/
checkouts
/
{id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: 'My Bearer Token',
});

const checkoutSessionStatus = await client.checkoutSessions.retrieve('id');

console.log(checkoutSessionStatus.id);
{
  "created_at": "2023-11-07T05:31:56Z",
  "customer_email": "<string>",
  "customer_name": "<string>",
  "id": "<string>",
  "payment_id": "<string>",
  "payment_status": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

Checkout session successfully fetched

created_at
string<date-time>
required

Created at timestamp

id
string
required

Id of the checkout session

customer_email
string | null

Customer email: prefers payment's customer, falls back to session

customer_name
string | null

Customer name: prefers payment's customer, falls back to session

payment_id
string | null

Id of the payment created by the checkout sessions.

Null if checkout sessions is still at the details collection stage.

payment_status
enum<string> | null

status of the payment.

Null if checkout sessions is still at the details collection stage.

Available options:
succeeded,
failed,
cancelled,
processing,
requires_customer_action,
requires_merchant_action,
requires_payment_method,
requires_confirmation,
requires_capture,
partially_captured,
partially_captured_and_capturable