GET/v1/customers/{external_id}/billing
Get what a customer is billed for
Returns what Stripe bills the customer for: whether they are linked, each billed subscription's status, price and items, any drift from what they hold, and whether a subscription renews. An unknown or unlinked customer answers an empty value. Needs customers:read.
curl 'https://api.entitler.co/v1/customers/ada/billing' \
-H "Authorization: Bearer $ENTITLER_KEY"Credentials
Send any one of these:
- Bearer token
Path parameters
| Name | Type | Description |
|---|---|---|
external_idrequired | string | The customer's external ID, or me for the customer a customer token or identity token names. |
Query parameters
| Name | Type | Description |
|---|---|---|
target.team_id | string | |
target.project_id | string | |
target.environment_id | string |
Responses
200The GetBillingResponse message.
GetBillingResponse
billingCustomerBillingconnectionIdstringdriftBillingDriftbilledPlanIdstringrequiredheldPlanIdstringobservedAtintegerrequiredat least 0; at most 18446744073709552000
productIdstring
itemsinteger (int64)requiredat least 0; at most 4294967295
linkedbooleanrequiredproductsarray of BilledProductrequiredconnectionIdstringrequireddriftBillingDriftbilledPlanIdstringrequiredheldPlanIdstringobservedAtintegerrequiredat least 0; at most 18446744073709552000
productIdstring
itemsinteger (int64)requiredat least 0; at most 4294967295
productIdstringrenewsbooleanrequiredskuBilledSkuperiodIdstringpriceListingPriceamountintegerrequiredat least 0; at most 18446744073709552000
currencystringrequiredintervalListingPriceIntervalrequiredOne of
LISTING_PRICE_INTERVAL_UNSPECIFIED,LISTING_PRICE_INTERVAL_DAY,LISTING_PRICE_INTERVAL_WEEK,LISTING_PRICE_INTERVAL_MONTH,LISTING_PRICE_INTERVAL_YEAR.intervalCountinteger (int64)requiredat least 0; at most 4294967295
taxListingTaxBehaviourrequiredOne of
LISTING_TAX_BEHAVIOUR_UNSPECIFIED,LISTING_TAX_BEHAVIOUR_INCLUSIVE,LISTING_TAX_BEHAVIOUR_EXCLUSIVE.
priceIdstringrequired
statusProviderSubscriptionStatusrequiredOne of
PROVIDER_SUBSCRIPTION_STATUS_UNSPECIFIED,PROVIDER_SUBSCRIPTION_STATUS_ACTIVE,PROVIDER_SUBSCRIPTION_STATUS_TRIALING,PROVIDER_SUBSCRIPTION_STATUS_PAST_DUE,PROVIDER_SUBSCRIPTION_STATUS_INCOMPLETE,PROVIDER_SUBSCRIPTION_STATUS_INCOMPLETE_EXPIRED,PROVIDER_SUBSCRIPTION_STATUS_CANCELED,PROVIDER_SUBSCRIPTION_STATUS_UNPAID,PROVIDER_SUBSCRIPTION_STATUS_PAUSED.
renewsbooleanrequiredskuBilledSkuperiodIdstringpriceListingPriceamountintegerrequiredat least 0; at most 18446744073709552000
currencystringrequiredintervalListingPriceIntervalrequiredOne of
LISTING_PRICE_INTERVAL_UNSPECIFIED,LISTING_PRICE_INTERVAL_DAY,LISTING_PRICE_INTERVAL_WEEK,LISTING_PRICE_INTERVAL_MONTH,LISTING_PRICE_INTERVAL_YEAR.intervalCountinteger (int64)requiredat least 0; at most 4294967295
taxListingTaxBehaviourrequiredOne of
LISTING_TAX_BEHAVIOUR_UNSPECIFIED,LISTING_TAX_BEHAVIOUR_INCLUSIVE,LISTING_TAX_BEHAVIOUR_EXCLUSIVE.
priceIdstringrequired
statusProviderSubscriptionStatusrequiredOne of
PROVIDER_SUBSCRIPTION_STATUS_UNSPECIFIED,PROVIDER_SUBSCRIPTION_STATUS_ACTIVE,PROVIDER_SUBSCRIPTION_STATUS_TRIALING,PROVIDER_SUBSCRIPTION_STATUS_PAST_DUE,PROVIDER_SUBSCRIPTION_STATUS_INCOMPLETE,PROVIDER_SUBSCRIPTION_STATUS_INCOMPLETE_EXPIRED,PROVIDER_SUBSCRIPTION_STATUS_CANCELED,PROVIDER_SUBSCRIPTION_STATUS_UNPAID,PROVIDER_SUBSCRIPTION_STATUS_PAUSED.
ErrorA refusal, with the HTTP status of its gRPC code.
Error
errorobjectrequiredcodestringrequiredparametersobjectrequiredEach value: string
reasonstringor nullrequired