Saltar al contenido principal
GET
/
v1
/
billing
/
subscription
Get Subscription
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
  }
}

Autorizaciones

Authorization
string
header
requerido

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

Respuesta

Successful Response

name
string
requerido

Name of the subscription plan

next_invoice_date
string<date-time> | null
requerido

Date of the next invoice. If null, the plan has been cancelled: it will not renew and no more invoiced willbe charged.

period_start
string<date-time>
requerido

Start date of the current billing period

period_end
string<date-time>
requerido

End date of the current billing period

included_minutes
integer
requerido

Number of included minutes in the plan

active_since
string<date-time>
requerido

Date when the subscription became active

price
number
requerido

Price of the subscription plan

currency
string
requerido

Currency of the subscription plan

period
enum<string>
requerido

Billing period of the subscription plan

Opciones disponibles:
month,
year,
day,
week
overage_price_per_minute
number | null
requerido

Price per minute for usage beyond the included minutes, null if metered usage is disabled.

usage_based_billing_enabled
boolean
requerido

Indicates if metered usage is enabled for the company

minutes_count
integer
requerido

Total number of minutes used in the current billing period

rollover_minutes_count
integer
requerido

Number of rollover minutes available in the current billing period

next_payment_date
string<date-time>
requerido

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).

next_invoice_amount
number | null

Amount of the next invoice, including metered usage

next_phase
SubscriptionPhaseSchema · object

Information about the next scheduled subscription phase