Skip to main content
GET
/
cart
/
checkout
/
status
JavaScript
import HenrySDK from '@henrylabs/sdk';

const client = new HenrySDK({
  apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.cart.checkout.pollDetails({
  refId: 'ckd-ref_3fa85f64-5717-4562-b3fc',
});

console.log(response.refId);
{
  "refId": "<string>",
  "result": {
    "items": [
      {
        "shippingOptions": [
          {
            "id": "<string>",
            "name": "<string>",
            "cost": {
              "value": 123
            },
            "timeEstimate": "<string>",
            "minDate": "<string>",
            "maxDate": "<string>"
          }
        ],
        "costs": {
          "subtotal": {
            "value": 123
          },
          "total": {
            "value": 123
          },
          "tax": {
            "value": 123
          },
          "shipping": {
            "value": 123
          },
          "discount": {
            "value": 123
          }
        },
        "coupons": [
          {
            "code": "<string>",
            "available": true,
            "savedAmount": {
              "value": 123
            }
          }
        ]
      }
    ],
    "data": {
      "shippingOptions": [
        {
          "id": "<string>",
          "name": "<string>",
          "cost": {
            "value": 123
          },
          "timeEstimate": "<string>",
          "minDate": "<string>",
          "maxDate": "<string>"
        }
      ],
      "costs": {
        "subtotal": {
          "value": 123
        },
        "total": {
          "value": 123
        },
        "tax": {
          "value": 123
        },
        "shipping": {
          "value": 123
        },
        "discount": {
          "value": 123
        }
      },
      "coupons": [
        {
          "code": "<string>",
          "available": true,
          "savedAmount": {
            "value": 123
          }
        }
      ]
    }
  },
  "error": {}
}

Authorizations

x-api-key
string
header
required

Query Parameters

refId
string
required

Reference ID used for checking status

Pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
Example:

"ckd-ref_3fa85f64-5717-4562-b3fc"

Response

Cart details status retrieved successfully

refId
string
required
Pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
status
enum<string>
required
Available options:
pending,
processing,
complete,
failed
result
object
error
object