1.0.9 • Published 2 years ago

@novo-x/spreedly v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago