import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.checkouts.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"mode": "<string>",
"currency": "<string>",
"total": 123,
"client_secret": "<string>",
"checkout_items": [
{
"object": "<string>",
"quantity": 123,
"price_variant": "<string>",
"product": "<string>"
}
],
"customer": "<string>"
}Returns a specific checkout session
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.checkouts.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"mode": "<string>",
"currency": "<string>",
"total": 123,
"client_secret": "<string>",
"checkout_items": [
{
"object": "<string>",
"quantity": 123,
"price_variant": "<string>",
"product": "<string>"
}
],
"customer": "<string>"
}API key in the format: Bearer {api_token}
The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Checkout details
open, complete, abandoned, expired Show child attributes
ID by default, full object when expanded
Was this page helpful?