Overview

The Carbon BaaS SDK simplifies integration with the Carbon Business API. It provides easy-to-use methods for creating accounts, fetching accounts, and more.


Installation

Install the SDK via npm:

npm install carbon-baas-sdk

Configuration

Initialize the SDK with your API key and mode (live or sandbox).

CommonJS Example

const carbon = require('carbon-baas-sdk');

// Initialize the SDK
carbon.initialize('your_api_key_here', 'sandbox');

// Create an account
carbon.createAccount('customer_id', 'static')
  .then(response => console.log(response))
  .catch(error => console.error(error));

// Fetch an account
carbon.fetchAccount('account_number')
  .then(response => console.log(response))
  .catch(error => console.error(error));