capacitor-stripe-terminal
    Preparing search index...

    Interface Cart

    An Cart object contains information about what line items are included in the current transaction. A cart object should be created and then passed into setReaderDisplay(), which will display the cart's contents on the reader's screen.

    The Cart only represents exactly what will be shown on the screen, and is not reflective of what the customer is actually charged. You are responsible for making sure that tax and total reflect what is in the cart.

    Only Internet readers support setReaderDisplay functionality

    interface Cart {
        currency: string;
        lineItems: CartLineItem[];
        tax: number;
        total: number;
    }
    Index
    currency: string

    The currency of the cart.

    lineItems: CartLineItem[]

    You can add or remove line items from this array individually or reassign the array entirely. After making your desired changes, call setReaderDisplay to update the cart on the reader's screen.

    tax: number

    The displayed tax amount, provided in the currency’s smallest unit.

    total: number

    The cart’s total balance, provided in the currency’s smallest unit.