GET
/
checkout
/
sessions
/
{session_id}
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.CheckoutSessions.GetAsync(sessionId: "4137b1cf-39ac-42a8-bad6-1c680d5dab6b");

// handle response
{
  "cart_items": [
    {
      "name": "GoPro HD",
      "quantity": 2,
      "unit_amount": 1299,
      "discount_amount": 0,
      "tax_amount": 0,
      "external_identifier": "goprohd",
      "sku": "GPHD1078",
      "product_url": "https://example.com/catalog/go-pro-hd",
      "image_url": "https://example.com/images/go-pro-hd.jpg",
      "categories": [
        "camera",
        "travel",
        "gear"
      ],
      "product_type": "physical",
      "seller_country": "US"
    }
  ],
  "metadata": {
    "cohort": "cohort-a",
    "order_id": "order-12345"
  },
  "buyer": {
    "display_name": "John Doe",
    "external_identifier": "buyer-12345",
    "billing_details": {
      "first_name": "John",
      "last_name": "Doe",
      "email_address": "john@example.com",
      "phone_number": "+1234567890",
      "address": {
        "city": "San Jose",
        "country": "US",
        "postal_code": "94560",
        "state": "California",
        "state_code": "US-CA",
        "house_number_or_name": "10",
        "line1": "Stafford Appartments",
        "line2": "29th Street",
        "organization": "Gr4vy"
      },
      "tax_id": {
        "value": "12345678931",
        "kind": "us.ein"
      }
    },
    "account_number": "<string>",
    "shipping_details": {
      "first_name": "John",
      "last_name": "Doe",
      "email_address": "john@example.com",
      "phone_number": "+1234567890",
      "address": {
        "city": "San Jose",
        "country": "US",
        "postal_code": "94560",
        "state": "California",
        "state_code": "US-CA",
        "house_number_or_name": "10",
        "line1": "Stafford Appartments",
        "line2": "29th Street",
        "organization": "Gr4vy"
      }
    }
  },
  "type": "checkout-session",
  "id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b",
  "expires_at": "2013-07-16T19:23:00.000+00:00",
  "payment_method": {
    "type": "payment-method",
    "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389",
    "details": {
      "bin": "411111",
      "card_country": "US",
      "card_type": "credit",
      "card_issuer_name": "Bank of America NA"
    },
    "label": "1234",
    "method": "card",
    "scheme": "visa",
    "fingerprint": "a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4"
  }
}

This endpoint requires the checkout-sessions.read scope.

Authorizations

Authorization
string
header
required

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

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Path Parameters

session_id
string
required

The ID of the checkout session.

Examples:

"4137b1cf-39ac-42a8-bad6-1c680d5dab6b"

Response

200
application/json

Successful Response

The response is of type object.