import { CartItem } from "@gr4vy/sdk/models/components";
let value: CartItem = {
name: "GoPro HD",
quantity: 2,
unitAmount: 1299,
};| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name |
string | ✔️ | The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters. | GoPro HD |
quantity |
number | ✔️ | The quantity of this item in the cart. This value cannot be negative or zero. | 2 |
unitAmount |
number | ✔️ | The amount for an individual item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99. The amount sent through to the payment processor as unitary amount will be calculated to include the discount and tax values sent as part of this cart item. |
1299 |
discountAmount |
number | ➖ | The amount discounted for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99. |
0 |
taxAmount |
number | ➖ | The tax amount for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99. |
0 |
externalIdentifier |
string | ➖ | An external identifier for the cart item. This can be set to any value and is not sent to the payment service. | goprohd |
sku |
string | ➖ | The SKU or product code for the item. | GPHD1078 |
upc |
string | ➖ | The UPC for the item. | 012345678905 |
productUrl |
string | ➖ | The product URL for the item. | https://example.com/catalog/go-pro-hd |
imageUrl |
string | ➖ | The URL for the image of the item. | https://example.com/images/go-pro-hd.jpg |
categories |
string[] | ➖ | A list of strings containing product categories for the item. | [ "camera", "travel", "gear" ] |
productType |
components.ProductType | ➖ | The product type of the cart item. | physical |
sellerCountry |
string | ➖ | The seller country of the cart item. | Example 1: US Example 2: GB |
taxExempt |
boolean | ➖ | Whether the item is exempt of tax. | false |
unitOfMeasure |
string | ➖ | The unit of measure or the unit of measure code. | Example 1: feet Example 2: kg |
commodityCode |
string | ➖ | Item commodity code. Generally a UNSPSC code. | Example 1: 43211503 Example 2: 84111502 |
description |
string | ➖ | Brief item description. | A brief description of an interesting item. |
dutyAmount |
number | ➖ | Item import or export duties represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99 |
1299 |
shippingAmount |
number | ➖ | Freight/shipping amount represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99 |
1299 |