Liste tous les soldes clients pour un droit de crédit spécifique
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 customerCreditBalance of client.creditEntitlements.balances.list(
'credit_entitlement_id',
)) {
console.log(customerCreditBalance.id);
}{
"items": [
{
"balance": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credit_entitlement_id": "<string>",
"customer_id": "<string>",
"id": "<string>",
"overage": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"last_transaction_at": "2023-11-07T05:31:56Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Credit Entitlement ID
Page size default is 10 max is 100
x >= 0Page number default is 0
x >= 0Filter by specific customer ID
List of customer balances
Afficher attributs enfants
Cette page vous a-t-elle été utile ?
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 customerCreditBalance of client.creditEntitlements.balances.list(
'credit_entitlement_id',
)) {
console.log(customerCreditBalance.id);
}{
"items": [
{
"balance": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credit_entitlement_id": "<string>",
"customer_id": "<string>",
"id": "<string>",
"overage": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"last_transaction_at": "2023-11-07T05:31:56Z"
}
]
}