import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: 'My API Key',
});
const response = await client.checkout.session.listProducts({ 'x-session-token': 'x-session-token' });
console.log(response.message);{
"success": true,
"status": "<string>",
"message": "<string>",
"data": {
"products": [
{
"productId": "P01145AC2",
"name": "Men's Trail Runners",
"price": "100",
"quantity": 1,
"metadata": {
"color": "Black",
"size": "9"
},
"productLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106",
"affiliateProductLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106?ref=affiliate123",
"productImageLink": "https://images.ctfassets.net/hnk2vsx53n6l/2xi62H2BswFpVK0SjUmhXM/0d4a4bb14915c9a5d3228df45c774629/c36d3fd00cf91ec9fb5ff4bc4d4a0093cccbe8cd.png?w=192&h=192&fm=avif&f=center&fit=fill&q=80",
"variantCheck": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"result": "<any>",
"errorMessage": "<string>",
"createdAt": "<string>",
"completedAt": "<string>"
}
}
]
}
}Returns products for the checkout session
import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: 'My API Key',
});
const response = await client.checkout.session.listProducts({ 'x-session-token': 'x-session-token' });
console.log(response.message);{
"success": true,
"status": "<string>",
"message": "<string>",
"data": {
"products": [
{
"productId": "P01145AC2",
"name": "Men's Trail Runners",
"price": "100",
"quantity": 1,
"metadata": {
"color": "Black",
"size": "9"
},
"productLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106",
"affiliateProductLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106?ref=affiliate123",
"productImageLink": "https://images.ctfassets.net/hnk2vsx53n6l/2xi62H2BswFpVK0SjUmhXM/0d4a4bb14915c9a5d3228df45c774629/c36d3fd00cf91ec9fb5ff4bc4d4a0093cccbe8cd.png?w=192&h=192&fm=avif&f=center&fit=fill&q=80",
"variantCheck": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"result": "<any>",
"errorMessage": "<string>",
"createdAt": "<string>",
"completedAt": "<string>"
}
}
]
}
}