Skip to content

WeslleyDeSouza/payrexx-nodejs

Repository files navigation

Payrexx NodeJS SDK

Payrexx NodeJS/TS API Wrapper https://github.com/WeslleyDeSouza/payrexx-nodejs

📦 Installation

NPM: npm i --save payrexx@latest

YARN: yarn add payrexx

Documentation

For further information, please refer to the official REST API reference: https://developers.payrexx.com/v1.0/reference

Examples

import PayRexx from "payrexx";

Paylink:

       const PayRexx = require('payrexx');

       let PAYR = new PayRexx( auth.instance, auth.secret);
        
       # Create PaymentLink
       const payment = await PAYR.paylink.create({
           "title":       "Item_423",
           "description": "Product_Selling_XY",
           "psp":             1,
           "referenceId": "test",
           "purpose":     "test",
           "amount":        10,
           "vatRate" :      0,
           "currency":     "CHF",
           "sku":           "20.19.03.1",
           "preAuthorization": false,
           "reservation":      0,
       });


       # Load PaymentLink
       await PAYR.payment.get(payment.id)

       # delete created PaymentLink
       await payment.delete()


Gateway:

    let PAYR = new PayRexx( auth.instance, auth.secret);

    const gateway = await PAYR.gateway.create({
        "amount": 8925,
        "vatRate": 7.7,
        "currency": "CHF",
        "sku": "P01122000",
        "preAuthorization": false,
        "reservation": 0,
        "successRedirectUrl": "https://www.merchant-website.com/success",
        "failedRedirectUrl":  "https://www.merchant-website.com/failed"
    });

About

Payrexx NodeJs API Wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published