1.0.10 • Published 4 years ago

tikkie-checkout v1.0.10

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Node.js Tikkie Checkout API

Easily create payment requests through Tikkie

Unofficial JavaScript implementation of the Tikkie Fast Checkout API.

Installation

npm install tikkie-checkout

Usage

import {TikkieCheckoutClient, TikkieCheckoutConfig} from 'tikkie-checkout';

const config = new TikkieCheckoutConfig('apiKey', 'merchantToken');
config.loadPrivateKey('path_to_key', 'RS256');

const tikkie = new TikkieCheckoutClient(config);

try {
  
    const createOrderRequest = await tikkie.createOrder({
    referenceId: "some reference", 
    shippingCostsInCents: 690,
    discountInCents: 500,
    currency: "EUR",
    expiration: 1800,
    redirectUrl: "https://www.yourdomain.nl/finishorder/1234",
    notificationUrl: "https://www.yourdomain.nl/1234",
    items: [
      {
        itemName: "Mobile Phone",
        priceInCents: 50000,
        quantity: 1
      }]
    });
    console.log(createOrderRequest);

    const getOrderRequest = await tikkie.getOrder(createOrderRequest.orderToken);
    console.log(getOrderRequest);
} catch (err) {
    console.error(err);
}

Inspiration

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago