Skip to main content
GET
/
v1
/
checkout
/
{checkoutId}
{
  "id": "cs_ci_123456789",
  "status": "created",
  "amount": 5000,
  "currency": "XOF",
  "user_phone": "+22507987654",
  "payment_id": "ORDER_123",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "failure_reason": "<string>",
  "transaction_fee": 25
}

Retrieve a Checkout Session

This endpoint allows you to retrieve the details of a specific checkout session using its unique identifier.

Endpoint

  • Endpoint: GET /v1/checkout/{checkoutId}
  • Description: Retrieve a checkout session by its ID.
  • Path Parameters:
    • checkoutId (string, required): The unique identifier of the checkout session to retrieve.
  • Response:
    {
      "id": "cs_test_123",
      "amount": 1000,
      "currency": "usd",
      "status": "completed",
      "payment_method": {
        "type": "card",
        "card": {
          "brand": "visa",
          "last4": "4242"
        }
      }
    }
    

Parameters

  • checkoutId (string, required): The unique identifier of the checkout session to retrieve.

Example Request

curl -X GET https://api.example.com/v1/checkout/cs_test_123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "id": "cs_test_123",
  "amount": 1000,
  "currency": "usd",
  "status": "completed",
  "payment_method": {
    "type": "card",
    "card": {
      "brand": "visa",
      "last4": "4242"
    }
  }
}

Notes

  • Ensure that you have the necessary permissions to access the checkout session details.
  • The response includes detailed information about the payment method used in the checkout session.

Errors

  • 404 Not Found: The specified checkout session does not exist.
  • 401 Unauthorized: Invalid or missing API key.
  • 400 Bad Request: Invalid request parameters.

See Also

Authorizations

Authorization
string
header
required

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

Path Parameters

checkoutId
string
required

Response

200 - application/json

Session returned

id
string
Example:

"cs_ci_123456789"

status
enum<string>
Available options:
created,
pending,
processing,
completed,
failed,
expired,
cancelled
Example:

"created"

amount
integer
Example:

5000

currency
string
Example:

"XOF"

user_phone
string
Example:

"+22507987654"

payment_id
string
Example:

"ORDER_123"

description
string
created_at
string<date-time>
expires_at
string<date-time>
completed_at
string<date-time> | null
failure_reason
string | null
transaction_fee
integer
Example:

25