Skip to main content
GET
/
balances
/
ledger
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const balanceLedgerEntry of client.balances.retrieveLedger()) {
  console.log(balanceLedgerEntry.id);
}
{
  "items": [
    {
      "amount": 123,
      "business_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "currency": "AED",
      "event_type": "payment",
      "id": "<string>",
      "is_credit": true,
      "usd_equivalent_amount": 123,
      "after_balance": 123,
      "before_balance": 123,
      "description": "<string>",
      "reference_object_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

created_at_gte
string<date-time>

Get events after this created time

created_at_lte
string<date-time>

Get events created before this time

reference_object_id
string

Get events history of a specific object like payment/subscription/refund/dispute

event_type
enum<string>

Filter by Ledger Event Type

Available options:
payment,
refund,
refund_reversal,
dispute,
dispute_reversal,
tax,
tax_reversal,
payment_fees,
refund_fees,
refund_fees_reversal,
dispute_fees,
payout,
payout_fees,
payout_reversal,
payout_fees_reversal,
dodo_credits,
adjustment,
currency_conversion
currency
enum<string>

Filter by currency

Available options:
AED,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BWP,
BYN,
BZD,
CAD,
CHF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SEK,
SGD,
SHP,
SLE,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SZL,
THB,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW
limit
integer<int64>

Min : 1, Max : 100, default 10

page_size
integer<int32>

Page size default is 10 max is 100

Required range: x >= 0
page_number
integer<int32>

Page number default is 0

Required range: x >= 0

Response

200 - application/json

Balance ledger entries

items
object[]
required