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

# Get Customer

> Retrieves a single customer by `provider_customer_id` within your configuration.



## OpenAPI

````yaml /openapi.json get /billing-customers/{provider_customer_id}
openapi: 3.1.0
info:
  title: OpenLoop API
  version: 0.1.0
  description: >-
    Unified reference for the OpenLoop Patient (clinical) and Payments & Revenue
    APIs.
servers:
  - url: https://api.openloophealth.com/v0.1
    description: Production partner edge
  - url: https://api-staging.openloophealth.com/v0.1
    description: Staging partner edge (sandbox credentials)
security: []
paths:
  /billing-customers/{provider_customer_id}:
    get:
      tags:
        - Billing Customers
      summary: Get Customer
      description: >-
        Retrieves a single customer by `provider_customer_id` within your
        configuration.
      parameters:
        - in: path
          name: provider_customer_id
          required: true
          schema:
            type: string
          description: Provider customer ID (e.g. `test_customer_id`).
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      config_id:
                        type: string
                        description: Configuration ID.
                      provider_account_id:
                        type:
                          - string
                          - 'null'
                        description: Provider account ID.
                      provider_customer_id:
                        type: string
                        description: Provider customer ID.
                      payment_provider:
                        type: string
                        description: Provider enum (e.g. `"stripe"`).
                      email:
                        type: string
                        description: Customer email.
                      name:
                        type: string
                        description: Customer name.
                      phone:
                        type:
                          - string
                          - 'null'
                        description: Customer phone.
                      description:
                        type:
                          - string
                          - 'null'
                        description: Customer description.
                      delinquent:
                        type:
                          - boolean
                          - 'null'
                        description: Whether the customer has an unpaid/overdue invoice.
                      address:
                        type:
                          - object
                          - 'null'
                        properties:
                          line1:
                            type:
                              - string
                              - 'null'
                            description: Street address line 1.
                          line2:
                            type:
                              - string
                              - 'null'
                            description: Street address line 2.
                          city:
                            type:
                              - string
                              - 'null'
                            description: City.
                          state:
                            type:
                              - string
                              - 'null'
                            description: State / province.
                          postal_code:
                            type:
                              - string
                              - 'null'
                            description: Postal code.
                          country:
                            type:
                              - string
                              - 'null'
                            description: Country.
                        description: >-
                          Billing address: `line1`, `line2`, `city`, `state`,
                          `postal_code`, `country` (all `string | null`).
                      shipping:
                        type:
                          - object
                          - 'null'
                        properties:
                          name:
                            type:
                              - string
                              - 'null'
                            description: Recipient name.
                          phone:
                            type:
                              - string
                              - 'null'
                            description: Recipient phone.
                          address:
                            type:
                              - object
                              - 'null'
                            properties:
                              line1:
                                type:
                                  - string
                                  - 'null'
                                description: Street address line 1.
                              line2:
                                type:
                                  - string
                                  - 'null'
                                description: Street address line 2.
                              city:
                                type:
                                  - string
                                  - 'null'
                                description: City.
                              state:
                                type:
                                  - string
                                  - 'null'
                                description: State / province.
                              postal_code:
                                type:
                                  - string
                                  - 'null'
                                description: Postal code.
                              country:
                                type:
                                  - string
                                  - 'null'
                                description: Country.
                            description: >-
                              Shipping address (same shape as the billing
                              `address` fields above).
                        description: >-
                          Shipping info: `name` (`string | null`), `phone`
                          (`string | null`), `address` (same shape as billing
                          address, or `null`).
                      default_invoice_payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          provider_payment_method_id:
                            type: string
                            description: Payment method ID.
                          type:
                            type: string
                            description: Payment method type (e.g. `"card"`).
                          card:
                            type:
                              - object
                              - 'null'
                            properties:
                              brand:
                                type: string
                                description: Card brand (e.g. `test_card_brand`).
                              last4:
                                type: string
                                description: Last four digits.
                              exp_month:
                                type: number
                                description: Expiration month.
                              exp_year:
                                type: number
                                description: Expiration year.
                            description: Card details; `null` for non-card payment methods.
                        description: >-
                          Default payment method for invoices; `null` when not
                          set. See sub-table.
                      created:
                        type:
                          - number
                          - 'null'
                        description: Unix timestamp of customer creation.
                      balance:
                        type: number
                        description: >-
                          The customer's balance with the payment provider, in
                          the smallest unit of `currency` (cents for USD).
                          Negative is a credit that applies to the next invoice;
                          positive is an amount added to the next invoice.
                          Counts only amounts not yet applied to an invoice, in
                          the customer's default currency only. `0` for a
                          customer with no balance changes.
                      currency:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Lowercase ISO currency code for `balance`; `null`
                          until the payment provider sets one.
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                        description: >-
                          Free-form string key/value pairs attached to the
                          billing customer. `{}` when none are set.
                required:
                  - data
              example:
                data:
                  config_id: test_config_id
                  provider_account_id: test_account_id
                  provider_customer_id: test_customer_id
                  payment_provider: stripe
                  email: customer@example.com
                  name: Example Customer
                  phone: '+000000000000'
                  description: Imported from EMR
                  delinquent: false
                  address: null
                  shipping:
                    name: Example Customer
                    phone: '+000000000000'
                    address: null
                  default_invoice_payment_method:
                    provider_payment_method_id: test_payment_method_id
                    type: card
                    card:
                      brand: test_card_brand
                      last4: '4242'
                      exp_month: 12
                      exp_year: 2028
                  created: 1300
                  balance: 0
                  currency: null
                  metadata: {}
        '400':
          description: 'ValidationError: Missing `provider_customer_id`.'
        '401':
          description: Missing or invalid bearer token.
        '403':
          description: >-
            No configuration exists for your account, or provider access has
            been disabled for it.
        '404':
          description: >-
            NotFoundError: Customer not found (including `the payment
            provider.DeletedCustomer`), or config not found.
        '500':
          description: An upstream provider error.
      security:
        - serviceToken: []
        - userToken: []
components:
  securitySchemes:
    serviceToken:
      type: oauth2
      description: >-
        Service (M2M) access token issued by POST /auth/token using the
        client_credentials grant. Required scopes, where known, are listed on
        each operation below.
      flows:
        clientCredentials:
          tokenUrl: https://api.openloophealth.com/v0.1/auth/token
          scopes: {}
    userToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User access token issued by POST /auth/token via the verification-code
        grant (after Verify a one-time code) or the refresh_token grant.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.