0.1.1-alpha.0 • Published 8 months ago

@snag-solutions/payments-sdk v0.1.1-alpha.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Snag Solutions Payments SDK

Install

npm i @snag-solutions/payments-sdk

Usage

To create a checkout session and redirect user for a payment

await new PaymentSDK().checkout({ name: '', // Name of the item description: '', // Description of the item images: [''], // Array of urls of image of the item amount: 0, // Amount in cents currency: 'usd', // Currency shortcut name shippingRate: '', // Shipping Rate ID successUrl: '', // Where to redirect on success cancelUrl: '', // Where to redirect on failure tokenId: 1, // Id of the token })

To get the details from the sessionId returned on each success/failure (it will be returned in query as session_id) await new PaymentSDK().sessionDetails(sessionId)

0.1.4-alpha.0

8 months ago

0.1.2-alpha.1

8 months ago

0.1.2-alpha.0

8 months ago

0.1.1-alpha.2

8 months ago

0.1.1-alpha.0

8 months ago