@novo-x/spreedly
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

Spreedly Service

Available methods

  • pay: makes a charge to the card
  • retrieve: returns card details
  • recache: recaches the cvv. It makes it available to spreedly for a few minutes
  • verify: verifies the card

Usage examples

yarn add @novo-x/spreedly

import {Spreedly} from "@novo-x/spreedly"

const MyService = new Spreedly(
    '123456789' // apiKey,
);

const payment = await MyService.pay(
    '123456789', // cardToken
    '123456789', // gatewayToken
    {
        payment_method_token: '123456789', // cardToken
        amount: 20,
        currency_code: "EUR",
        retain_on_success: true,
        gateway_specific_fields: {
            stripe: {
                destination: '123456789', // stripeConnectId
                application_fee_amount: 5, // fee
                destination_amount: 15, // amount to seller
                statement_description: "Novo-X Purchase",
            }
        }
    } // transactionConfig 
);

const card = await MyService.retrieve(
    '123456789' // cardToken
);

const recached = await MyService.recache(
    '123', // CVC
    '123456789' // cardToken
)

const verified = await MyService.verify(
    '123456789', // cardToken,
    '123456789', // gatewayToken
    'EUR' // currency
)

Dependencies

axios

Package Sidebar

Install

npm i @novo-x/spreedly

Weekly Downloads

0

Version

1.0.9

License

ISC

Unpacked Size

24.3 kB

Total Files

6

Last publish

Collaborators

  • lautarobruno
  • agustin-novolabs
  • novo-tincho
  • nicolas.novolabs
  • mati-novolabs
  • alejitowow
  • nahuelprieto