XendBridge
  • Get Started
  • 🛠️API Method Calls
    • Third Party Order Operations
      • Rate
      • Buy Order
      • Sell Order
      • Swap Order
      • Pending Order
      • Pay For Order
      • Cancel Order
    • LP Simulation
      • Pay For Order (Buy Order)
      • Pay For Order (Sell Order)
    • Dispute
      • Raise Third Party Dispute
      • Get All Disputes
      • XendBridge Chat SDK
    • Payment Inquiry
    • WebHooks
      • Order Payment Confirmation
      • Order Matched Notification
      • Order Canceled Notification
      • Checksum Verification
  • 📄XENDBRIDGE PORTAL
    • Checkout URL
      • Buy Order
      • Sell Order
      • Swap Order
      • Rate
      • Rate Bounds
      • Initiate Order Created With Deferred Payment Method
      • Supported Currencies
      • Payment Methods
    • Inline Html Snippet
    • DeFi Checkout
  • 📦XENDBRIDGE SDKS
    • XendBridge NodeJs SDK
    • XendBridge .NET SDK
      • Rate
      • Buy Order
      • Sell Order
      • Swap Order
      • Pending Order
      • Pay For Order Confirmation
      • Cancel Order
      • Raise A Dispute
  • Errors
  • 🔖REFERENCE
    • API Reference
Powered by GitBook
On this page

Was this helpful?

  1. XENDBRIDGE SDKS

XendBridge NodeJs SDK

PreviousDeFi CheckoutNextXendBridge .NET SDK

Last updated 2 years ago

Was this helpful?

Xendbridge provides a NodeJs SDK which can be integrated by installing directly from the Node Package Manager. This library abstracts the necessary API endpoints required to interact with the XendBridge P2P application into javascript functions. The package details can be found at

Setup

The steps below can be used to integrate the sdk to your NodeJs application

  1. npm install @xendbridge/nodejssdk

  2. Create a config folder on your application's root directory

  3. Create an {environment}.json file (eg. Sandbox.json) in the config folder and add the json object below

{ 
    "baseUrl": "xendbridge base url", 
    "publicKey": "Your xendbridge public key", 
    "secretKey": "Your xendbridge secret key" 
} 

Please note that the {environment}.json file should correspond to your app's deployment environment (eg. development, sandbox, production).

  1. Replace the property values with the appropriate xendbridge base URL and keys. See and to get your keys and urls.

  2. Import the XendBridge library into your javascript file using the code below and you'd be able to interract with the XendBridge api

const xendbridgeSDK = require('@xendbridge/nodejssdk')
📦
https://www.npmjs.com/package/@xendbridge/nodejssdk
Environments
Get Your Secret and Public Keys