Billing dashboard
Returns billing dashboard info, including historical invoices and movements from the given last months
Headers
-
Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)
Query parameters
-
billableOrganizationId integer(int64)
Organization Id. or Organization Group Id. If not present, and the logged user is a ORG_GROUP_ADMIN then his managed organizationGroupId will be used, otherwise the current logged account's standard organizationId will be used. Only an ADMIN can query freely any organizationId or organizationGroupId
-
last_months integer(int32)
Number of previous months to include movements from. Current month is always included so if the value is '1', then current and previous months will be considered. If zero only the movements of current month are retrieved. This is the default value.
-
invoices_limit integer(int32)
Maximum number of invoices returned. Unlimited by default
curl \
-X GET http://localhost:8080/api/billing-dashboard
{
"account_status": "ACTIVE",
"invoices": [
{
"amount_due": 42,
"amount_paid": 42,
"amount_remaining": 42,
"application_fee_amount": 42,
"attempt_count": 42,
"attempted": true,
"currency": "string",
"description": "string",
"due_date": "2024-05-04T09:42:00+00:00",
"finalized_at": "2024-05-04T09:42:00+00:00",
"id": "string",
"invoice_number": "string",
"marked_uncollectible_at": "2024-05-04T09:42:00+00:00",
"next_payment_attempt": "2024-05-04T09:42:00+00:00",
"paid": true,
"paid_at": "2024-05-04T09:42:00+00:00",
"pdf_url": "string",
"period_end": "2024-05-04T09:42:00+00:00",
"period_start": "2024-05-04T09:42:00+00:00",
"status": "string",
"voided_at": "2024-05-04T09:42:00+00:00"
}
],
"movement_counts": [
{
"count": 42,
"invoice_id": "string",
"period_end": "2024-05-04T09:42:00+00:00",
"period_start": "2024-05-04T09:42:00+00:00"
}
],
"payment_method": {
"card": {
"brand": "string",
"country": "string",
"created": 42,
"exp_month": 42,
"exp_year": 42,
"last4": "string"
},
"email": "string",
"id": "string"
},
"subscription": {
"active": true,
"aggregate_usage": "string",
"amount": 42,
"created": "2024-05-04T09:42:00+00:00",
"currency": "string",
"current_period_end": "2024-05-04T09:42:00+00:00",
"current_period_start": "2024-05-04T09:42:00+00:00",
"days_until_due": 42,
"id": "string",
"price_id": "string",
"status": "string",
"tiers_mode": "string",
"trial_end": "2024-05-04T09:42:00+00:00",
"trial_period_days": 42,
"trial_start": "2024-05-04T09:42:00+00:00"
},
"upcoming_invoice": {
"amount_due": 42,
"amount_paid": 42,
"amount_remaining": 42,
"application_fee_amount": 42,
"attempt_count": 42,
"attempted": true,
"currency": "string",
"description": "string",
"due_date": "2024-05-04T09:42:00+00:00",
"finalized_at": "2024-05-04T09:42:00+00:00",
"id": "string",
"invoice_number": "string",
"marked_uncollectible_at": "2024-05-04T09:42:00+00:00",
"next_payment_attempt": "2024-05-04T09:42:00+00:00",
"paid": true,
"paid_at": "2024-05-04T09:42:00+00:00",
"pdf_url": "string",
"period_end": "2024-05-04T09:42:00+00:00",
"period_start": "2024-05-04T09:42:00+00:00",
"status": "string",
"voided_at": "2024-05-04T09:42:00+00:00"
}
}