Skip to content

KindCoder-no/node-vipps-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS IS OUTDATED

The Vipps api has changed, a new version of this package may come later (Pull Requests are welcome)

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:

  • Vipps Login

About

A simple package to use the Vipps API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published