npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

quara-sdk

v0.73.0

Published

quara-sdk node.js SDK helps with the quara checkout API integration.

Readme

Quara checkout integration nodejs SDK

quara-sdk node.js SDK helps with the quara checkout API integration.

Installation

Install online package from https://www.npmjs.com npm install quara-sdk --save

Configuration

Create configuration for sdk

Create a config.json file with below keys:

{
  "baseUrl": "quara base url",
  "client_id": "client id supplied by quara",
  "client_secret": "client password supplied by quara"
}
- baseUrl: Domain url of quara checkout API.
- client_id: Will be supplied by quara support.
- client_secret: Will be supplied by quara support.

Usage:

1. Initialize the QuaraApiClient using the QuaraApiClientFactory:

Use QuaraApiClientFactory with sample code:

    import apiConfiguration from './config.json'
    import { QuaraApiClient, QuaraApiClientFactory } from 'quara-sdk';
    public client: QuaraApiClient;
    QuaraApiClientFactory.createApiClient(apiConfiguration).then((resp) => this.client = resp);

2. Calling the required sdk function over the QuaraApiClient:

    this.client.getOrderStatus("referenceId").then((response: any) => {
        });

API Support:

  1. quaraCheckout --- api/order/merchant/checkout
  2. getOrderStatus --- api/order/merchant/reference/{referenceId}/status
  3. checkoutRefund --- api/order/merchant/refund
  4. orderConfirmation --- api/order/merchant/orderConfirmation
  5. downloadPO --- api/order/merchant/downloadPO/{referenceId}

1. quaraCheckout

Following is the sample code to get the checkoutUrl. quaraCheckout Request body

{
  "referenceNumber": "",
  "invoiceNumber": "",
  "items": [
    {
      "id": 0,
      "type": "",
      "name": "",
      "category": "",
      "quantity": 0,
      "unitPrice": {
        "amount": "",
        "currency": "SAR",
        "vat": ""
      }
    }
  ],
  "quantity": "",
  "TotalAmount": {
    "amount": "",
    "currency": "SAR",
    "vat": ""
  }
}
  • reference :- A unique reference identifier for the transaction.
  • invoiceNumber :- The invoice number associated with the transaction.
  • items :- List of items in the order, each containing: Â Â Â Â Â Â Â Â id :- Unique identifier for the item. Â Â Â Â Â Â Â Â type :- Type of the item (e.g., "Physical"). Â Â Â Â Â Â Â Â name :- Name of the item. Â Â Â Â Â Â Â Â category :- Category of the item. Â Â Â Â Â Â Â Â quantity :- Quantity of the item. Â Â Â Â Â Â Â Â unitPrice :- Unit price details, including amount, currency, and VAT.
  • quantity :- Total quantity of items in the order.
  • totalAmount :- Total amount details, including amount, currency, and VAT.

quaraCheckout Response Body :

{
  "Error": {},
  "Response": {
    "reference": "",
    "orderId": "",
    "checkoutUrl": "",
    "poNumber": "",
    "message": ""
  }
}
  • reference :- A unique reference identifier for the transaction.
  • orderId :- The order ID associated with the transaction.
  • checkoutUrl :- The URL for the checkout, used for redirecting the user to the payment page.
  • poNumber :- The purchase order number associated with the transaction.
  • message :- If there are any error.

2. getOrderStatus

getOrderStatus response Body :

{
  "Error": { },
  "Response": {
    "orderId": "",
    "status": "",
    "statusCode": "",
    "subStatus": "",
    "statusUpdateDate": "",
    "createDate": ""
  }
}
  • orderID :- The order ID associated with the transaction.
  • status :- Different stages status like (PENDING, PROCESSING,COMPLETED,ETC).
  • statusCode :- This is associated with the status in which the current order is there.
  • subStatus :- Detailed description of the current status exactly in which stage the order is there.
  • statusUpdateDate :- Last status updated date.
  • createDate :- When the order was created.

3. checkoutRefund

checkoutRefund Body :

{
  "reference": "",
  "orderId": "",
  "remarks": "",
  "refundInvoiceDoc": ""
}
  • reference :- A unique reference identifier for the transaction.
  • orderId :- The order ID associated with the transaction.
  • remarks :- Reason for the order cancellation.
  • refundInvoiceDoc :- Base64 pdf doc.

checkoutRefund response Body:

{
  "Error": {},
  "Response": {
    "reference": "",
    "orderId": "",
    "refundStatus": "",
    "error": "",
    "status": ""
  }
}
  • reference :- A unique reference identifier for the transaction.
  • orderId :- The order ID associated with the transaction.
  • refundStatus :- Whether the refund was successful or not.
  • error : Error occurred when the refund request was made.
  • status :- Refund Status.

4.orderConfirmation

orderConfirmation request body:

{
    "referenceNumber": "",
    "invoiceNumber": ""
}
  • referenceNumber :- A unique reference identifier for the order.
  • orderId :- The order ID associated with the transaction.

orderConfirmation response body:

{
    "Error":{},
    "Response":{
        "referenceNumber": "",
        "invoiceNumber": "",
        "totalPrice": "",
        "contractSigned": true,
        "promissoryNoteAccepted": true,
        "errorMessage": {}
    }
}
  • referenceNumber :- A unique reference identifier for the transaction.
  • invoiceNumber :- The invoiceNumber associated with the transaction.
  • totalPrice :- Total order price.
  • errorMessage : Error object occurred when the confirmation request was made.
  • contractSigned :- boolean field to check if contract was signed.
  • promissoryNoteAccepted :- boolean field to check if EPromissory note was accepted.

4.downloadPO

downloadPO request url: {{app_url}}/api/order/merchant/downloadPO/{referenceNumber}

  • referenceNumber :- A unique reference identifier for the transaction.

downloadPO response body:

{
    "Error":{},
    "Response":{
        {
            "PONumber": "",
            "PODocument": "",
            "error": {},
            "status": ""
        }
    }
}
  • PONumber :- A unique PO number received while creating the order.
  • PODocument :- Base64 string of PO pdf document.
  • status : Status of the transaction.

Versions:

1.0.0