Customer Wallets
Get Customer Wallets
Retrieve wallets associated with a specific customer.
GET
/
customers
/
{customer_id}
/
wallets
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const wallets = await client.customers.wallets.list('customer_id');
console.log(wallets.items);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
wallets = client.customers.wallets.list(
"customer_id",
)
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(), "customer_id")
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("customer_id");
}
}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("customer_id")
}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("customer_id")
puts(wallets)curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/customers/{customer_id}/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_balance_usd": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Customer ID
Was this page helpful?
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const wallets = await client.customers.wallets.list('customer_id');
console.log(wallets.items);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
wallets = client.customers.wallets.list(
"customer_id",
)
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(), "customer_id")
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("customer_id");
}
}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("customer_id")
}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("customer_id")
puts(wallets)curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/wallets \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/customers/{customer_id}/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_balance_usd": 123
}