Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.4 KB

Balance.md

File metadata and controls

42 lines (33 loc) · 1.4 KB

Balance

You can use the APIs below to interface with Xendit's Balance API. To start using the API, you need to destruct instantiated Xendit client or directly import the module and set the secret key.

import { Xendit, Balance as BalanceClient } from 'xendit-node';

const xenditClient = new Xendit({secretKey: YOUR_SECRET_KEY})
const { Balance } = xenditClient

const xenditBalanceClient = new BalanceClient({secretKey: YOUR_SECRET_KEY})

// At this point, `Balance` and `xenditBalanceClient` will have no usage difference, for example:
// Balance.
// or
// xenditBalanceClient.

Retrieves balances for a business, default to CASH type

Function Signature

Name Value
Function Name getBalance
Request Parameters GetBalanceRequest
Return Type Balance

Request Parameters — GetBalanceRequest

Field Name Required Type
accountType 'CASH'
currency string
forUserId string
idempotencyKey string

Usage Examples

Minimum API Usage

import { Balance } from 'xendit-node/balance_and_transaction/models'

const response: Balance = await xenditBalanceClient.getBalance({ })