Customer Wallets
고객 지갑 가져오기
특정 고객과 연결된 금전적 지갑 잔액을 검색합니다. 지갑에는 송장 및 구독 결제에 적용할 수 있는 실제 자금(USD, INR)이 보관됩니다.
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
}마지막 수정일 2026년 4월 1일
⌘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
}