Customer Wallets
Obtenir les portefeuilles du client
Récupérez les soldes des portefeuilles monétaires associés à un client spécifique. Les portefeuilles contiennent des fonds réels (USD, INR) pouvant être appliqués aux factures et aux paiements d’abonnement.
GET
/
customers
/
{customer_id}
/
wallets
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const wallets = await client.customers.wallets.list('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(wallets.items);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
)
wallets = client.customers.wallets.list(
"cus_TV52uJWWXt2yIoBBxpjaa",
)
print(wallets.items)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"),
)
wallets, err := client.Customers.Wallets.List(context.TODO(), "cus_TV52uJWWXt2yIoBBxpjaa")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", wallets.Items)
}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.WalletListParams;
import com.dodopayments.api.models.customers.wallets.WalletListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
WalletListResponse wallets = client.customers().wallets().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.WalletListParams
import com.dodopayments.api.models.customers.wallets.WalletListResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val wallets: WalletListResponse = client.customers().wallets().list("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
wallets = dodo_payments.customers.wallets.list("cus_TV52uJWWXt2yIoBBxpjaa")
puts(wallets)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$wallets = $client->customers->wallets->list('cus_TV52uJWWXt2yIoBBxpjaa');
var_dump($wallets);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers.Wallets;
DodoPaymentsClient client = new();
WalletListParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var wallets = await client.Customers.Wallets.List(parameters);
Console.WriteLine(wallets);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()
.list()
.customer_id(customer_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets \
--header 'Authorization: Bearer <token>'{
"items": [
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_balance_usd": 123
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
Customer ID
Dernière modification le 1 avril 2026
Cette page vous a-t-elle été utile ?
Précédent
Lister les entrées de grand livre du portefeuille du clientLister 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.
Suivant
⌘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
});
const wallets = await client.customers.wallets.list('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(wallets.items);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
)
wallets = client.customers.wallets.list(
"cus_TV52uJWWXt2yIoBBxpjaa",
)
print(wallets.items)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"),
)
wallets, err := client.Customers.Wallets.List(context.TODO(), "cus_TV52uJWWXt2yIoBBxpjaa")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", wallets.Items)
}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.WalletListParams;
import com.dodopayments.api.models.customers.wallets.WalletListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
WalletListResponse wallets = client.customers().wallets().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.WalletListParams
import com.dodopayments.api.models.customers.wallets.WalletListResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val wallets: WalletListResponse = client.customers().wallets().list("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
wallets = dodo_payments.customers.wallets.list("cus_TV52uJWWXt2yIoBBxpjaa")
puts(wallets)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$wallets = $client->customers->wallets->list('cus_TV52uJWWXt2yIoBBxpjaa');
var_dump($wallets);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers.Wallets;
DodoPaymentsClient client = new();
WalletListParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var wallets = await client.Customers.Wallets.List(parameters);
Console.WriteLine(wallets);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()
.list()
.customer_id(customer_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets \
--header 'Authorization: Bearer <token>'{
"items": [
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_balance_usd": 123
}