अपने खाते से संबंधित सभी सदस्यताओं की सूची प्राप्त करें।
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 subscriptionListResponse of client.subscriptions.list()) {
console.log(subscriptionListResponse.product_id);
}{
"items": [
{
"billing": {
"country": "AF",
"city": "<string>",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"cancel_at_next_billing_date": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>",
"metadata": {},
"phone_number": "<string>"
},
"metadata": {},
"next_billing_date": "2023-11-07T05:31:56Z",
"on_demand": true,
"payment_frequency_count": 123,
"payment_frequency_interval": "Day",
"previous_billing_date": "2023-11-07T05:31:56Z",
"product_id": "<string>",
"quantity": 123,
"recurring_pre_tax_amount": 123,
"status": "pending",
"subscription_id": "<string>",
"subscription_period_count": 123,
"subscription_period_interval": "Day",
"tax_inclusive": true,
"trial_period_days": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"discount_cycles_remaining": 123,
"discount_id": "<string>",
"payment_method_id": "<string>",
"tax_id": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Get events after this created time
Get events created before this time
Page size default is 10 max is 100
x >= 0Page number default is 0
x >= 0Filter by customer id
Filter by status
pending, active, on_hold, cancelled, failed, expired filter by Brand id
दिखाएं चाइल्ड एट्रिब्यूट्स
वाज़ दिस पेज हेल्पफुल
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 subscriptionListResponse of client.subscriptions.list()) {
console.log(subscriptionListResponse.product_id);
}{
"items": [
{
"billing": {
"country": "AF",
"city": "<string>",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"cancel_at_next_billing_date": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>",
"metadata": {},
"phone_number": "<string>"
},
"metadata": {},
"next_billing_date": "2023-11-07T05:31:56Z",
"on_demand": true,
"payment_frequency_count": 123,
"payment_frequency_interval": "Day",
"previous_billing_date": "2023-11-07T05:31:56Z",
"product_id": "<string>",
"quantity": 123,
"recurring_pre_tax_amount": 123,
"status": "pending",
"subscription_id": "<string>",
"subscription_period_count": 123,
"subscription_period_interval": "Day",
"tax_inclusive": true,
"trial_period_days": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"discount_cycles_remaining": 123,
"discount_id": "<string>",
"payment_method_id": "<string>",
"tax_id": "<string>"
}
]
}