square-web-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.2 • Public • Published

    square-web-sdk

    An unofficial npm package for Square Web Payments SDK, with TypeScript types definition.

    Install

    # via npm
    npm i -S square-web-sdk
    
    # via yarn
    yarn add square-web-sdk

    Usage

    import { loadSquare } from 'square-web-sdk';
    
    async function usageExample() {
        await loadSquare(false /* use sandbox */);
    
        const payments = Square.payments('applicationId', 'locationId');
        const card: Square.Card = await payments.card();
        await card.attach('#card');
    
        const token = await card.tokenize();
    }

    License

    MIT

    Install

    npm i square-web-sdk

    DownloadsWeekly Downloads

    9

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    52.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • acrazing