Vai al contenuto principale
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
}

Autorizzazioni

Authorization
string
header
obbligatorio

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

Parametri del percorso

customer_id
string
obbligatorio

Customer ID

Risposta

items
object[]
obbligatorio
total_balance_usd
integer<int64>
obbligatorio

Sum of all wallet balances converted to USD (in smallest unit)

Ultima modifica il 1 aprile 2026