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

# Get billing info

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns your workspace's invoices, saved payment methods and billing contact. Only the workspace owner can call this.

What you get depends on how the workspace is billed:
- **Stripe**: the 50 most recent Stripe invoices, the saved cards with their expiry dates, and which card is the default.
- **Wix**: every Wix invoice, the payment method on the plan, and the billing contact with the workspace owner's email.

Without `include_all_provider_invoices`, a Wix-billed workspace also gets its Google Ads charges, and a workspace that moved off Wix keeps its Wix invoices. Set `include_all_provider_invoices` to `true` to add the invoices from every other billing provider the workspace has used instead, except drafts and voided invoices. Each invoice names its provider in `provider`.

Invoices from a provider other than the one billing the workspace are left out when that provider doesn't answer within a few seconds. On a Wix-billed workspace, Wix invoices and payment methods are also left out when Wix doesn't answer. So an empty list doesn't always mean there's nothing there.

Open a Wix invoice or a Google Ads charge with [Open invoice](/api-reference/open-invoice). Update the card with [Create billing portal session](/api-reference/create-billing-portal-session) or [Create payment method update session](/api-reference/create-payment-method-update-session).

<Note>Missing or invalid credentials, and a read-only token, return 401 here.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/billing/billing-info
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/billing/billing-info:
    get:
      summary: Get billing info
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Returns your workspace's invoices, saved payment methods and billing
        contact. Only the workspace owner can call this.


        What you get depends on how the workspace is billed:

        - **Stripe**: the 50 most recent Stripe invoices, the saved cards with
        their expiry dates, and which card is the default.

        - **Wix**: every Wix invoice, the payment method on the plan, and the
        billing contact with the workspace owner's email.


        Without `include_all_provider_invoices`, a Wix-billed workspace also
        gets its Google Ads charges, and a workspace that moved off Wix keeps
        its Wix invoices. Set `include_all_provider_invoices` to `true` to add
        the invoices from every other billing provider the workspace has used
        instead, except drafts and voided invoices. Each invoice names its
        provider in `provider`.


        Invoices from a provider other than the one billing the workspace are
        left out when that provider doesn't answer within a few seconds. On a
        Wix-billed workspace, Wix invoices and payment methods are also left out
        when Wix doesn't answer. So an empty list doesn't always mean there's
        nothing there.


        Open a Wix invoice or a Google Ads charge with [Open
        invoice](/api-reference/open-invoice). Update the card with [Create
        billing portal session](/api-reference/create-billing-portal-session) or
        [Create payment method update
        session](/api-reference/create-payment-method-update-session).


        <Note>Missing or invalid credentials, and a read-only token, return 401
        here.</Note>


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time.</Warning>
      operationId: get_billing_info_api_billing_billing_info_get
      parameters:
        - name: include_all_provider_invoices
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              `true` adds the invoices from every other billing provider the
              workspace has used, except drafts and voided invoices. Defaults to
              `false`.
            default: false
            title: Include All Provider Invoices
          description: >-
            `true` adds the invoices from every other billing provider the
            workspace has used, except drafts and voided invoices. Defaults to
            `false`.
          example: true
      responses:
        '200':
          description: The workspace's invoices, payment methods and billing contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingInfo'
              example:
                invoices:
                  - id: in_1QZk4LDr56L89dkKx3bT0aPq
                    provider: stripe
                    amount: 50
                    currency: USD
                    status: paid
                    date: 1761379200
                    period_start: 1761379200
                    period_end: 1763971200
                    hosted_invoice_url: >-
                      https://invoice.stripe.com/i/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
                    invoice_pdf: >-
                      https://pay.stripe.com/invoice/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL/pdf
                    description: Pro Plan - Monthly
                    billing_reason: subscription_cycle
                    disputed: false
                payment_methods:
                  - id: pm_1QZk4LDr56L89dkK2c9sXy0b
                    brand: visa
                    last4: '4242'
                    exp_month: 12
                    exp_year: 2028
                    is_default: true
                billing_information:
                  name: Nordwind Furniture Ltd
                  email: owner@nordwind.example
                  billing_address: 12 Harbour St, Bristol, BS1 4QA, GB
                default_card_payment_method_id: pm_1QZk4LDr56L89dkK2c9sXy0b
        '400':
          description: The workspace is billed through Wix but has no Wix billing account.
        '401':
          description: >-
            Missing or invalid credentials. A read-only token gets this response
            too.
        '403':
          description: You aren't the workspace owner.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: bool_parsing
                    loc:
                      - query
                      - include_all_provider_invoices
                    msg: Input should be a valid boolean, unable to interpret input
                    input: maybe
        '429':
          description: >-
            Rate limit exceeded. The base rate limit is 60 requests per minute
            per user. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    BillingInfo:
      properties:
        invoices:
          items:
            $ref: '#/components/schemas/BillingInvoice'
          type: array
          title: Invoices
          description: The workspace's invoices, newest first.
          example:
            - amount: 50
              billing_reason: subscription_cycle
              currency: USD
              date: 1761379200
              description: Pro Plan - Monthly
              disputed: false
              hosted_invoice_url: >-
                https://invoice.stripe.com/i/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
              id: in_1QZk4LDr56L89dkKx3bT0aPq
              invoice_pdf: >-
                https://pay.stripe.com/invoice/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL/pdf
              period_end: 1763971200
              period_start: 1761379200
              provider: stripe
              status: paid
        payment_methods:
          items:
            $ref: '#/components/schemas/BillingPaymentMethod'
          type: array
          title: Payment Methods
          description: Saved payment methods.
          example:
            - brand: visa
              exp_month: 12
              exp_year: 2028
              id: pm_1QZk4LDr56L89dkK2c9sXy0b
              is_default: true
              last4: '4242'
        billing_information:
          anyOf:
            - $ref: '#/components/schemas/BillingContact'
            - type: 'null'
          description: Billing contact and address, or `null` when the provider has none.
        default_card_payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Card Payment Method Id
          description: >-
            ID of the card Stripe charges by default, or `null` when the default
            isn't a card. Always `null` on Wix-billed workspaces.
          example: pm_1QZk4LDr56L89dkK2c9sXy0b
      type: object
      required:
        - invoices
        - payment_methods
        - billing_information
        - default_card_payment_method_id
      title: BillingInfo
      description: The workspace's invoices, payment methods and billing contact.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BillingInvoice:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            ID of the invoice. Pass it to [Open
            invoice](/api-reference/open-invoice) to get a link for a Wix
            invoice or a Google Ads charge. `null` on a Wix invoice that has no
            number yet.
          example: in_1QZk4LDr56L89dkKx3bT0aPq
        provider:
          type: string
          enum:
            - stripe
            - wix
          title: Provider
          description: Which billing provider issued the invoice.
          example: stripe
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: >-
            Amount of the invoice, in major units of `currency` (dollars, not
            cents). `null` on a Wix invoice with no total.
          example: 50
        currency:
          type: string
          title: Currency
          description: Three-letter currency code, such as `USD`.
          example: USD
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: >-
            Status of the invoice. Stripe invoices use Stripe's statuses, such
            as `open` or `paid`. Wix invoices are `paid`, `refunded` or
            `chargeback`, or `null` for any other kind.
          example: paid
        date:
          anyOf:
            - type: integer
            - type: 'null'
          title: Date
          description: When the invoice was issued, as a Unix timestamp in seconds.
          example: 1761379200
        period_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Period Start
          description: >-
            Start of the billed period, as a Unix timestamp in seconds. `null`
            on Wix invoices with no plan line, such as top-ups.
          example: 1761379200
        period_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Period End
          description: End of the billed period, as a Unix timestamp in seconds.
          example: 1763971200
        hosted_invoice_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Hosted Invoice Url
          description: >-
            Hosted page for the invoice. On a Wix invoice, open it with [Open
            invoice](/api-reference/open-invoice) instead.
          example: >-
            https://invoice.stripe.com/i/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
        invoice_pdf:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Pdf
          description: >-
            Link to the invoice PDF. Stripe invoices only. Always `null` on Wix
            invoices.
          example: >-
            https://pay.stripe.com/invoice/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL/pdf
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: What the invoice is for, such as the plan and billing period.
          example: Pro Plan - Monthly
        billing_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Billing Reason
          description: >-
            Why Stripe issued the invoice, such as `subscription_cycle` or
            `subscription_update`. Always `null` on Wix invoices.
          example: subscription_cycle
        disputed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Disputed
          description: >-
            `true` while the payment is under a dispute. Stripe invoices only.
            Not returned on Wix invoices.
          example: false
      type: object
      required:
        - id
        - provider
        - amount
        - currency
        - status
        - date
        - period_start
        - period_end
        - hosted_invoice_url
        - invoice_pdf
        - description
        - billing_reason
      title: BillingInvoice
      description: One invoice in the workspace's billing history.
    BillingPaymentMethod:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: ID of the payment method at the billing provider.
          example: pm_1QZk4LDr56L89dkK2c9sXy0b
        brand:
          type: string
          title: Brand
          description: Card brand, such as `visa`.
          example: visa
        last4:
          type: string
          title: Last4
          description: >-
            Last four digits of the card. On a Wix-billed workspace this is
            Wix's label for the payment method, which isn't always four digits.
          example: '4242'
        exp_month:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exp Month
          description: Expiry month. `null` on Wix-billed workspaces.
          example: 12
        exp_year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exp Year
          description: Expiry year. `null` on Wix-billed workspaces.
          example: 2028
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: >-
            `true` for the card Stripe charges by default. Stripe only. Not
            returned on Wix-billed workspaces.
          example: true
      type: object
      required:
        - id
        - brand
        - last4
        - exp_month
        - exp_year
      title: BillingPaymentMethod
      description: A saved payment method.
    BillingContact:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Name on the billing account.
          example: Nordwind Furniture Ltd
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: >-
            Billing email. On a Wix-billed workspace this is the workspace
            owner's email.
          example: owner@nordwind.example
        billing_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Billing Address
          description: Billing address on one line, comma-separated.
          example: 12 Harbour St, Bristol, BS1 4QA, GB
      type: object
      required:
        - name
        - email
        - billing_address
      title: BillingContact
      description: The billing contact and address.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

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