Get billing info
Get billing info. Scoped to the organization named by organization_id.
Authorization
bearerAuth AuthorizationBearer <token>
JWT token from authentication
In: header
Path Parameters
organization_id*string
Match
^org_Header Parameters
Endless-Api-Version?string
Pin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/organizations/org_abc123/billing"{ "organization_id": "string", "organization_name": "string", "has_customer": true, "has_subscription": true, "customer": { "id": "string", "name": "string", "email": "string", "billing_emails": [ "string" ], "balance": 0, "delinquent": true, "has_payment_method": true, "payment_method": { "type": "string", "brand": "string", "last4": "string", "exp_month": 0, "exp_year": 0, "funding": "string", "is_default": true } }, "subscription": { "id": "string", "status": "active", "is_active": true, "current_period_start": "string", "current_period_end": "string", "next_period_start": "string", "next_period_end": "string", "next_invoice": { "amount_due": 0, "currency": "string", "billed_at": "string" }, "cancel_at": "string", "canceled_at": "string", "cancel_at_period_end": true, "trial_start": "string", "trial_end": "string", "collection_method": "string", "cancels_at_trial_end": true, "is_linked": true, "latest_invoice": { "status": "string", "amount_due": 0, "amount_paid": 0, "currency": "string", "hosted_invoice_url": "string", "due_date": "string", "created": "string" }, "discounts": [ { "id": "string", "coupon_name": "string", "percent_off": 0, "amount_off": 0, "currency": "string", "duration": "string", "duration_in_months": 0, "end": "string" } ], "collection_state": { "collects": "card", "has_payment_method": true, "card": { "type": "string", "brand": "string", "last4": "string", "exp_month": 0, "exp_year": 0, "funding": "string", "is_default": true }, "card_expired": true, "billing_email": "string", "trial_outcome": "bills", "trial_ends_at": "string", "trial_end_behavior": "string", "self_renews": true, "ends_at": "string", "ends_reason": "scheduled_date", "next_bill": "scheduled", "next_bill_at": "string", "last_payment": { "at": "string", "amount": 0, "currency": "string", "out_of_band": true }, "open_drafts": 0 }, "plan": { "plan_id": "hobby", "name": "string", "description": "string", "credits": 0, "price": 0, "currency": "string", "interval": "month" }, "scheduled_change": { "effective_date": "string", "managed_by_staff": true, "new_plan": { "plan_id": "hobby", "name": "string", "credits": 0, "price": 0, "currency": "string", "interval": "month" } } }, "available_plans": [ { "id": "string", "plan_id": "hobby", "name": "string", "description": "string", "prices": [ { "id": "string", "amount": 0, "currency": "string", "interval": "month", "credits": 0, "usage_interval": "string", "usage_interval_count": 0 } ] } ], "credit_purchase": { "blocked_reason": "no_subscription", "rate": { "unit_amount_cents": -9007199254740991, "credits_per_billing_period": -9007199254740991, "credits_per_cycle": -9007199254740991, "currency": "string" } }}