मुख्य सामग्री पर जाएं
GET
/
subscriptions
/
{subscription_id}
/
credit-usage
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 response = await client.subscriptions.retrieveCreditUsage('subscription_id');

console.log(response.subscription_id);
{
  "items": [
    {
      "balance": "250.00",
      "credit_entitlement_id": "<string>",
      "credit_entitlement_name": "<string>",
      "limit_reached": true,
      "overage": "15.50",
      "overage_enabled": true,
      "unit": "<string>",
      "overage_limit": "100.00",
      "remaining_headroom": "84.50"
    }
  ],
  "subscription_id": "<string>"
}

प्राधिकरण

Authorization
string
header
आवश्यक

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

पथ पैरामीटर

subscription_id
string
आवश्यक

Subscription ID

प्रतिक्रिया

200 - application/json

Credit usage status for all entitlements linked to a subscription

items
object[]
आवश्यक
subscription_id
string
आवश्यक
Last modified on April 1, 2026