1.1.2 • Published 2 years ago

vipps-api v1.1.2

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

node-vipps-api

A simple package to use the Vipps API

You can view the required body models documented in Vipps swagger documentation

Ecom Documentation

Recurring Documentation

This is an updated version of CrystallizeAPI/node-vipps

Install

npm install vipps-api

Usage

Initiate the client

const VippsClient = require('vipps-api')

const client = new VippsClient({
    id: "MY_VIPPS_CLIENT_ID",
    secret: "MY_VIPPS_CLIENT_SECRET",
    subscriptionId: "MY_VIPPS_SUB_KEY",
    testDrive: isProd ? false : true
});

Initiate a payment

await client.initiatePayment({order:VippsCheckoutModel});

Capture a payment

await client.capture({ orderId: VippsOrderId, body: VippsCaptureBodyModel });

Refund a payment

await client.refund({ orderId: VippsOrderId, body: VippsRefundBodyModel });

Get order payment details

await client.getOrderDetails({ orderId: VippsOrderId});

Create Recurring Agreement

await client.createAgreement({ order: VippsAgreementModel});

Get Recurring Agreement details

await client.getAgreement({ agreementId: VippsAgreementId });

Update Recurring Agreement

await client.updateAgreement({ agreementId: VippsAgreementId, body: VippsAgreementModel});

Get an access token

await client.getAccessToken();

Todo:

  • Update Recurring to V3
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

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