The Vipps api has changed, a new version of this package may come later (Pull Requests are welcome)
A simple package to use the Vipps API
You can view the required body models documented in Vipps swagger documentation
This is an updated version of CrystallizeAPI/node-vipps
npm install vipps-api
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
});
await client.initiatePayment({order:VippsCheckoutModel});
await client.capture({ orderId: VippsOrderId, body: VippsCaptureBodyModel });
await client.refund({ orderId: VippsOrderId, body: VippsRefundBodyModel });
await client.getOrderDetails({ orderId: VippsOrderId});
await client.createAgreement({ order: VippsAgreementModel});
await client.getAgreement({ agreementId: VippsAgreementId });
await client.updateAgreement({ agreementId: VippsAgreementId, body: VippsAgreementModel});
await client.getAccessToken();
- Vipps Login