> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metronome.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a customer billing configuration

> Fetch the billing configuration for the given customer. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.




## OpenAPI

````yaml /openapi.plans.json get /customers/{customer_id}/billing-config/{billing_provider_type}
openapi: 3.0.1
info:
  title: Metronome
  version: 1.0.0
servers:
  - url: https://api.metronome.com/v1
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Webhooks
    description: >-
      Inspect webhook delivery history, notification payloads, and retry
      attempts for the last 30 days. See the [Webhooks
      guide](/guides/platform-configuration/setup-webhooks) for notification
      types and delivery behavior.
  - name: Customers
    description: >-
      [Customers](https://docs.metronome.com/provisioning/create-customers/) in
      Metronome represent your users for all billing and reporting. Use these
      endpoints to create, retrieve, update, and archive customers and their
      billing configuration.
  - name: Billable metrics
    description: >-
      [Billable
      metrics](https://docs.metronome.com/understanding-metronome/how-metronome-works#billable-metrics)
      in Metronome represent the various consumption components that Metronome
      meters and aggregates.
  - name: Usage
    description: >-
      [Usage
      events](https://docs.metronome.com/connecting-metronome/send-usage-data/)
      are the basis for billable metrics. Use these endpoints to send usage
      events to Metronome and retrieve aggregated event data.
  - name: Plans
    description: >-
      [Plans](https://docs.metronome.com/pricing-and-packaging/create-plans/)
      determine the base pricing for a customer. Use these endpoints to add a
      plan to a customer, end a customer plan, retrieve plans, and retrieve plan
      details. Create plans in the [Metronome
      app](https://app.metronome.com/plans).
  - name: Contracts
    description: >-
      A contract defines a customer’s products, pricing, discounts, commitments,
      and more. Use these endpoints to create and update contracts data.
  - name: Credit grants
    description: >-
      [Credit
      grants](https://docs.metronome.com/invoicing/how-billing-works/manage-credits/)
      adjust a customer balance for prepayments, reimbursements, promotions, and
      so on. Use these endpoints to create, retrieve, update, and delete credit
      grants.
  - name: Invoices
    description: >-
      [Invoices](https://docs.metronome.com/invoicing/) reflect how much a
      customer spent during a period, which is the basis for billing. Metronome
      automatically generates invoices based upon your pricing, packaging, and
      usage events. Use these endpoints to retrieve invoices.
  - name: Alerts
    description: >-
      [Alerts](https://docs.metronome.com/connecting-metronome/alerts/) monitor
      customer spending, balances, and other billing factors. Use these
      endpoints to create, retrieve, and archive customer alerts. To view sample
      alert payloads by alert type, navigate
      [here.](https://docs.metronome.com/manage-product-access/create-manage-alerts/#webhook-notifications)
  - name: Custom fields
    description: >-
      [Custom fields](https://docs.metronome.com/integrations/custom-fields/)
      enable adding additional data to Metronome entities. Use these endpoints
      to create, retrieve, update, and delete custom fields.
  - name: Security
    description: >-
      [Security](https://docs.metronome.com/developer-resources/security/)
      endpoints allow you to retrieve security-related data.
  - name: Settings
    description: >-
      Use these endpoints to configure a billing API key, a webhook secret, or
      invoice finalization behavior.
paths:
  /customers/{customer_id}/billing-config/{billing_provider_type}:
    get:
      tags:
        - Customers
      summary: Get a customer billing configuration
      description: >
        Fetch the billing configuration for the given customer. This is a Plans
        (deprecated) endpoint. New clients should implement using Contracts.
      operationId: getBillingConfig
      parameters:
        - $ref: '#/components/parameters/CustomerId'
        - $ref: '#/components/parameters/BillingProviderType'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    properties:
                      billing_provider_customer_id:
                        type: string
                      stripe_collection_method:
                        $ref: '#/components/schemas/StripeCollectionMethod'
                      aws_product_code:
                        type: string
                      aws_region:
                        $ref: '#/components/schemas/AwsRegion'
                      aws_expiration_date:
                        $ref: '#/components/schemas/AwsExpirationDate'
                      aws_is_subscription_product:
                        description: >-
                          True if the aws_product_code is a SAAS subscription
                          product, false otherwise.
                        type: boolean
                      azure_subscription_status:
                        $ref: '#/components/schemas/AzureSubscriptionStatus'
                      azure_plan_id:
                        type: string
                        format: uuid
                      azure_start_date:
                        $ref: '#/components/schemas/AzureTermDate'
                      azure_expiration_date:
                        $ref: '#/components/schemas/AzureTermDate'
              example:
                data:
                  billing_provider_customer_id: cus_AJ6y20bjkOOayM
                  stripe_collection_method: charge_automatically
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CustomerId:
      name: customer_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      example: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc
    BillingProviderType:
      name: billing_provider_type
      in: path
      description: The billing provider (e.g. stripe)
      required: true
      schema:
        $ref: '#/components/schemas/BillingProviderType'
      example: stripe
  schemas:
    StripeCollectionMethod:
      type: string
      description: The collection method for the customer's invoices.
      enum:
        - charge_automatically
        - send_invoice
    AwsRegion:
      type: string
      enum:
        - af-south-1
        - ap-east-1
        - ap-northeast-1
        - ap-northeast-2
        - ap-northeast-3
        - ap-south-1
        - ap-southeast-1
        - ap-southeast-2
        - ca-central-1
        - cn-north-1
        - cn-northwest-1
        - eu-central-1
        - eu-north-1
        - eu-south-1
        - eu-west-1
        - eu-west-2
        - eu-west-3
        - me-south-1
        - sa-east-1
        - us-east-1
        - us-east-2
        - us-gov-east-1
        - us-gov-west-1
        - us-west-1
        - us-west-2
    AwsExpirationDate:
      type: string
      format: date-time
      description: >-
        Contract expiration date for the customer. The expected format is RFC
        3339 and can be retrieved from [AWS's GetEntitlements
        API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).
    AzureSubscriptionStatus:
      type: string
      enum:
        - Subscribed
        - Unsubscribed
        - Suspended
        - PendingFulfillmentStart
    AzureTermDate:
      type: string
      format: date-time
      description: >-
        Subscription term start/end date for the customer. The expected format
        is RFC 3339 and can be retrieved from [Azure's Get Subscription
        API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).
    BillingProviderType:
      type: string
      enum:
        - aws_marketplace
        - stripe
        - netsuite
        - custom
        - azure_marketplace
        - quickbooks_online
        - workday
        - gcp_marketplace
        - metronome
      x-mint-enum:
        netsuite:
          - client_id:11db091c-975b-4908-9f67-b1ceb126acdf
        custom:
          - client_id:11db091c-975b-4908-9f67-b1ceb126acdf
        workday:
          - client_id:11db091c-975b-4908-9f67-b1ceb126acdf
        gcp_marketplace:
          - client_id:11db091c-975b-4908-9f67-b1ceb126acdf
    Error:
      required:
        - message
      type: object
      properties:
        message:
          type: string
  responses:
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````