Customer Wallets
顧客のウォレット元帳エントリの一覧
特定の顧客のウォレット元帳エントリ(資金の追加および差し引き)を一覧表示します。ページネーションと通貨フィルタに対応しています。
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>"
}
]
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
Customer ID
クエリパラメータ
必須範囲:
x >= 0必須範囲:
x >= 0Optional currency filter
利用可能なオプション:
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 レスポンス
Show child attributes
Show child attributes
最終更新日 2026年4月1日
前へ
顧客ウォレット元帳エントリの作成顧客のウォレットに金銭を追加または差し引きします。entry_type に 'credit' を指定して資金を追加し、'debit' を指定して差し引きます。ウォレット残高は実際の通貨(USD、INR)で、サブスクリプションの請求書に適用できます。
次へ
⌘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>"
}
]
}