import requests
url = "https://api.diga.io/v1/billing/subscription/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"name": "<string>",
"next_invoice_date": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"included_minutes": 123,
"active_since": "2023-11-07T05:31:56Z",
"price": 123,
"currency": "<string>",
"period": "month",
"overage_price_per_minute": 123,
"usage_based_billing_enabled": true,
"minutes_count": 123,
"rollover_minutes_count": 123,
"next_payment_date": "2023-11-07T05:31:56Z",
"next_invoice_amount": 123,
"next_phase": {
"name": "<string>",
"period": "month",
"price": 123
}
}Retrieve information about
import requests
url = "https://api.diga.io/v1/billing/subscription/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"name": "<string>",
"next_invoice_date": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"included_minutes": 123,
"active_since": "2023-11-07T05:31:56Z",
"price": 123,
"currency": "<string>",
"period": "month",
"overage_price_per_minute": 123,
"usage_based_billing_enabled": true,
"minutes_count": 123,
"rollover_minutes_count": 123,
"next_payment_date": "2023-11-07T05:31:56Z",
"next_invoice_amount": 123,
"next_phase": {
"name": "<string>",
"period": "month",
"price": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
Name of the subscription plan
Date of the next invoice. If null, the plan has been cancelled: it will not renew and no more invoiced willbe charged.
Start date of the current billing period
End date of the current billing period
Number of included minutes in the plan
Date when the subscription became active
Price of the subscription plan
Currency of the subscription plan
Billing period of the subscription plan
month, year, day, week Price per minute for usage beyond the included minutes, null if metered usage is disabled.
Indicates if metered usage is enabled for the company
Total number of minutes used in the current billing period
Number of rollover minutes available in the current billing period
Date of the next payment. If usage-based billing is enabled, this is the next invoice date. Otherwise, it's the period end (subscription renewal date).
Amount of the next invoice, including metered usage
Information about the next scheduled subscription phase
Mostrar atributos secundarios