Skip to content

An unofficial npm package for Square web payment SDK, includes TypeScript types definition.

License

Notifications You must be signed in to change notification settings

scaffoldly/square-web-sdk

Repository files navigation

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

About

An unofficial npm package for Square web payment SDK, includes TypeScript types definition.

Resources

License

Stars

Watchers

Forks

Packages

No packages published