Skip to content
EntitlerDocs

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

NameTypeDescription
external_idrequiredstringThe customer's external ID, or me for the customer a customer token or identity token names.

Query parameters

NameTypeDescription
target.team_idstring
target.project_idstring
target.environment_idstring

Responses

200The GetBillingResponse message.

GetBillingResponse

  • billingCustomerBilling
    • connectionIdstring
    • driftBillingDrift
      • billedPlanIdstringrequired
      • heldPlanIdstring
      • observedAtintegerrequired

        at least 0; at most 18446744073709552000

      • productIdstring
    • itemsinteger (int64)required

      at least 0; at most 4294967295

    • linkedbooleanrequired
    • productsarray of BilledProductrequired
      • connectionIdstringrequired
      • driftBillingDrift
        • billedPlanIdstringrequired
        • heldPlanIdstring
        • observedAtintegerrequired

          at least 0; at most 18446744073709552000

        • productIdstring
      • itemsinteger (int64)required

        at least 0; at most 4294967295

      • productIdstring
      • renewsbooleanrequired
      • skuBilledSku
        • periodIdstring
        • priceListingPrice
          • amountintegerrequired

            at least 0; at most 18446744073709552000

          • currencystringrequired
          • intervalListingPriceIntervalrequired

            One of LISTING_PRICE_INTERVAL_UNSPECIFIED, LISTING_PRICE_INTERVAL_DAY, LISTING_PRICE_INTERVAL_WEEK, LISTING_PRICE_INTERVAL_MONTH, LISTING_PRICE_INTERVAL_YEAR.

          • intervalCountinteger (int64)required

            at least 0; at most 4294967295

          • taxListingTaxBehaviourrequired

            One of LISTING_TAX_BEHAVIOUR_UNSPECIFIED, LISTING_TAX_BEHAVIOUR_INCLUSIVE, LISTING_TAX_BEHAVIOUR_EXCLUSIVE.

        • priceIdstringrequired
      • statusProviderSubscriptionStatusrequired

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

    • renewsbooleanrequired
    • skuBilledSku
      • periodIdstring
      • priceListingPrice
        • amountintegerrequired

          at least 0; at most 18446744073709552000

        • currencystringrequired
        • intervalListingPriceIntervalrequired

          One of LISTING_PRICE_INTERVAL_UNSPECIFIED, LISTING_PRICE_INTERVAL_DAY, LISTING_PRICE_INTERVAL_WEEK, LISTING_PRICE_INTERVAL_MONTH, LISTING_PRICE_INTERVAL_YEAR.

        • intervalCountinteger (int64)required

          at least 0; at most 4294967295

        • taxListingTaxBehaviourrequired

          One of LISTING_TAX_BEHAVIOUR_UNSPECIFIED, LISTING_TAX_BEHAVIOUR_INCLUSIVE, LISTING_TAX_BEHAVIOUR_EXCLUSIVE.

      • priceIdstringrequired
    • statusProviderSubscriptionStatusrequired

      One 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

  • errorobjectrequired
    • codestringrequired
    • parametersobjectrequired

      Each value: string

    • reasonstringor nullrequired