Skip to content

bboynton97/square-capacitor-plugin

Repository files navigation

square-reader-capacitor-plugin

Capacitor.js plugin for using the Square Card Reader SDK

Install

npm install square-capacitor-plugin
npx cap sync

In your iOS project, add the SquareReaderSDK from these docs: https://developer.squareup.com/docs/reader-sdk/build-on-ios

Make sure to add the initialization line to the application delegate: https://developer.squareup.com/docs/reader-sdk/build-on-ios#step-6-add-code-to-initialize-the-reader-sdk

API

pluginTest()

pluginTest() => Promise<{ value: string; }>

Returns: Promise<{ value: string; }>


isAuthorized()

isAuthorized() => Promise<{ authorized: boolean; }>

Returns: Promise<{ authorized: boolean; }>


authorizeReaderSdk(...)

authorizeReaderSdk(options: { auth_code: string; }) => Promise<{ success: boolean; }>
Param Type
options { auth_code: string; }

Returns: Promise<{ success: boolean; }>


startCheckout(...)

startCheckout(options: { amount: number; }) => Promise<{ success: boolean; }>
Param Type
options { amount: number; }

Returns: Promise<{ success: boolean; }>


About

Capacitor JS plugin for using the Square Card Reader SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published