Customer Wallets
Lister les entrées de grand livre du portefeuille du client
Lister les écritures du grand livre du portefeuille (ajouts et déductions de fonds) pour un client spécifique. Prend en charge la pagination et le filtre de devise.
GET
/
customers
/
{customer_id}
/
wallets
/
ledger-entries
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 customerWalletTransaction of client.customers.wallets.ledgerEntries.list(
'cus_TV52uJWWXt2yIoBBxpjaa',
)) {
console.log(customerWalletTransaction.id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.customers.wallets.ledger_entries.list(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.Customers.Wallets.LedgerEntries.List(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerWalletLedgerEntryListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListPage;
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LedgerEntryListPage page = client.customers().wallets().ledgerEntries().list("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListPage
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: LedgerEntryListPage = client.customers().wallets().ledgerEntries().list("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.customers.wallets.ledger_entries.list("cus_TV52uJWWXt2yIoBBxpjaa")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
use Dodopayments\Misc\Currency;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->customers->wallets->ledgerEntries->list(
'cus_TV52uJWWXt2yIoBBxpjaa',
currency: Currency::AED,
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers.Wallets.LedgerEntries;
DodoPaymentsClient client = new();
LedgerEntryListParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var page = await client.Customers.Wallets.LedgerEntries.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.wallets()
.ledger_entries()
.list()
.customer_id(customer_id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets/ledger-entries \
--header 'Authorization: Bearer <token>'{
"items": [
{
"after_balance": 123,
"amount": 123,
"before_balance": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"id": "<string>",
"is_credit": true,
"reason": "<string>",
"reference_object_id": "<string>"
}
]
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
Customer ID
Paramètres de requête
Plage requise:
x >= 0Plage requise:
x >= 0Optional currency filter
Options disponibles:
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 Réponse
Show child attributes
Show child attributes
Dernière modification le 1 avril 2026
Cette page vous a-t-elle été utile ?
⌘I
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 customerWalletTransaction of client.customers.wallets.ledgerEntries.list(
'cus_TV52uJWWXt2yIoBBxpjaa',
)) {
console.log(customerWalletTransaction.id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.customers.wallets.ledger_entries.list(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.Customers.Wallets.LedgerEntries.List(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerWalletLedgerEntryListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListPage;
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LedgerEntryListPage page = client.customers().wallets().ledgerEntries().list("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListPage
import com.dodopayments.api.models.customers.wallets.ledgerentries.LedgerEntryListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: LedgerEntryListPage = client.customers().wallets().ledgerEntries().list("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.customers.wallets.ledger_entries.list("cus_TV52uJWWXt2yIoBBxpjaa")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
use Dodopayments\Misc\Currency;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->customers->wallets->ledgerEntries->list(
'cus_TV52uJWWXt2yIoBBxpjaa',
currency: Currency::AED,
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers.Wallets.LedgerEntries;
DodoPaymentsClient client = new();
LedgerEntryListParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var page = await client.Customers.Wallets.LedgerEntries.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.wallets()
.ledger_entries()
.list()
.customer_id(customer_id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets/ledger-entries \
--header 'Authorization: Bearer <token>'{
"items": [
{
"after_balance": 123,
"amount": 123,
"before_balance": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"id": "<string>",
"is_credit": true,
"reason": "<string>",
"reference_object_id": "<string>"
}
]
}