spreedly
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

Spreedly API Client

Simple typescript/javascript client for the spreedly API

import Client from 'spreedly';

const client = new Client(environment, token);

const GATEWAY_ID = '123';

const { token } = await client.createCreditCard(email, {
    fullName,
    number,
    month,
    year,
    verificationValue,
}, { userId: '1' });

await client.retainCreditCard(token);
await client.purchase(GATEWAY_ID, { amount: 100, currencyCode: 'USD', paymentMethodToken: token });

Readme

Keywords

Package Sidebar

Install

npm i spreedly

Weekly Downloads

108

Version

0.0.16

License

Apache-2.0

Unpacked Size

7.49 kB

Total Files

6

Last publish

Collaborators

  • johndagostino
  • ordermentumeng