curl --request GET \
--url https://api.bachs.io/v1/checkout-sessions/{checkout_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/checkout-sessions/{checkout_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/checkout-sessions/{checkout_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/checkout-sessions/{checkout_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"checkout_id": "chk_1M2N3o4P5q6R7s8T",
"status": "completed",
"recurring": null,
"payment_status": "succeeded",
"source_type": "CHECKOUT_SESSION",
"amount": "50.00",
"currency": "USD",
"reference": "order_9876",
"charge": {
"payment_id": "pay_1a2b3c4d5e",
"billing_reason": "purchase",
"status": "succeeded",
"amount": "29.00",
"currency": "USD",
"fee_usd": "0.59"
},
"payment_method": "CARD",
"customer": {
"id": "cust_1a2b3c4d5e6f",
"email": "jane@example.com",
"name": "Jane Doe"
},
"customer_details": {
"email": "jane@example.com",
"name": "Jane Doe"
},
"success_url": "https://yourapp.com/success",
"cancel_url": "https://yourapp.com/cancel",
"products": [
{
"product_id": "prod_abc123",
"product_name": "Premium Plan",
"quantity": 1,
"unit_amount": "50.00",
"currency": "USD",
"price_type": "fixed",
"minimum_amount": null,
"maximum_amount": null,
"line_total": "50.00"
}
],
"billing_currency": "NGN",
"session_mode": "CART",
"metadata": {
"order_id": "ORD-9876"
},
"created_at": "2026-01-24T14:30:00.000Z",
"expires_at": "2026-01-24T15:30:00.000Z",
"completed_at": "2026-01-24T14:35:00.000Z",
"updated_at": "2026-01-24T14:35:00.000Z"
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}Retrieve a checkout session
Retrieve the details of a checkout session by its ID, including resolved product line items and charge information.
The charge field is null while the session is OPEN and populated once the customer submits a payment.
Requires payments:read scope.
curl --request GET \
--url https://api.bachs.io/v1/checkout-sessions/{checkout_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/checkout-sessions/{checkout_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/checkout-sessions/{checkout_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/checkout-sessions/{checkout_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"checkout_id": "chk_1M2N3o4P5q6R7s8T",
"status": "completed",
"recurring": null,
"payment_status": "succeeded",
"source_type": "CHECKOUT_SESSION",
"amount": "50.00",
"currency": "USD",
"reference": "order_9876",
"charge": {
"payment_id": "pay_1a2b3c4d5e",
"billing_reason": "purchase",
"status": "succeeded",
"amount": "29.00",
"currency": "USD",
"fee_usd": "0.59"
},
"payment_method": "CARD",
"customer": {
"id": "cust_1a2b3c4d5e6f",
"email": "jane@example.com",
"name": "Jane Doe"
},
"customer_details": {
"email": "jane@example.com",
"name": "Jane Doe"
},
"success_url": "https://yourapp.com/success",
"cancel_url": "https://yourapp.com/cancel",
"products": [
{
"product_id": "prod_abc123",
"product_name": "Premium Plan",
"quantity": 1,
"unit_amount": "50.00",
"currency": "USD",
"price_type": "fixed",
"minimum_amount": null,
"maximum_amount": null,
"line_total": "50.00"
}
],
"billing_currency": "NGN",
"session_mode": "CART",
"metadata": {
"order_id": "ORD-9876"
},
"created_at": "2026-01-24T14:30:00.000Z",
"expires_at": "2026-01-24T15:30:00.000Z",
"completed_at": "2026-01-24T14:35:00.000Z",
"updated_at": "2026-01-24T14:35:00.000Z"
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Path Parameters
The checkout ID returned when the session was created.
Response
Checkout session retrieved successfully.
Checkout session details returned by GET /v1/checkout-sessions/{checkout_id}.
Unique checkout identifier.
"chk_1M2N3o4P5q6R7s8T"
Current lifecycle status of the checkout session. open: awaiting customer payment, where every new session starts. completed: payment succeeded, a terminal state. expired: the session window elapsed before payment, a terminal state. cancelled: cancelled before completion, a terminal state.
open, completed, expired, cancelled "completed"
Total amount in currency.
"50.00"
Base currency code.
"USD"
The customer attached to the checkout.
Show child attributes
Show child attributes
ISO 8601 creation timestamp.
"2026-01-24T14:30:00.000Z"
ISO 8601 last-updated timestamp.
"2026-01-24T14:35:00.000Z"
Present only for a subscription checkout; null for a one-time checkout.
Show child attributes
Show child attributes
Payment lifecycle for the checkout. requires_payment_method, requires_confirmation, requires_action, processing, succeeded, failed, or canceled.
requires_payment_method, requires_confirmation, requires_action, processing, succeeded, failed, canceled "requires_payment_method"
What created the checkout, e.g. CHECKOUT_SESSION or API.
"CHECKOUT_SESSION"
The reference you set when you created the session. null if you set none.
"order_9876"
The payment created by this checkout, once payment has been attempted. null before then.
Show child attributes
Show child attributes
The payment method selected for the checkout, if any. For every method except card, this is the exact corridor collected, such as NGN_BANK_TRANSFER, MOMO_GHS, or CRYPTO. Card charges report CARD rather than USD_CARD or NGN_CARD; read the currency to tell which card corridor collected it.
"NGN_BANK_TRANSFER"
What the buyer supplied; present whenever an identity was collected, record or no record. null before then.
Show child attributes
Show child attributes
URL the customer is redirected to after successful payment.
"https://yourapp.com/success"
URL the customer is redirected to if they cancel.
"https://yourapp.com/cancel"
Resolved product line items. Populated for CART sessions; may be null for SELECTION sessions before the customer picks a product.
Show child attributes
Show child attributes
Currency the customer selected for billing.
"NGN"
The platform's cut of this sale, in the base currency of the sale. The key is always present; it reads null, not "0.00", on a checkout that carries no fee, and on a checkout that split the sale with transfer_data.amount instead. See Platform fees.
"20000.00"
The seller's contracted share of this sale, in the base currency of the sale. Null on a checkout that carries no split, and on one that split the sale with platform_fee instead.
"80000.00"
How products are presented. CART sums a fixed set of items; SELECTION lets the customer pick one from a group.
CART, SELECTION "CART"
Public metadata you attached at session creation.
{ "order_id": "ORD-9876" }
ISO 8601 expiry timestamp.
"2026-01-24T15:30:00.000Z"
ISO 8601 timestamp when the session was completed.
"2026-01-24T14:35:00.000Z"

