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

# Retrieve a specific Account

> Retrieves detailed information about a specific account by its unique identifier or external reference.




## OpenAPI

````yaml GET /billing/accounts/{account}
openapi: 3.1.0
info:
  title: Moment Billing APIs
  version: 1.0.0
  description: >
    # Moment Billing APIs


    The Moment Billing APIs provide comprehensive billing and account management
    capabilities for merchants to manage customers, accounts, and bills with
    enterprise-grade reliability and security.
  contact:
    name: Moment
    url: https://momentco.net
    email: support@momentco.net
servers:
  - url: https://api.momentpay.net
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Customers
    description: >
      Operations for managing customers. Customers are the primary entities in
      the billing system

      that can have accounts and bills associated with them.
  - name: Accounts
    description: >
      Operations for managing accounts. Accounts provide sub-organization within
      customers

      for separate balance tracking and payment management.
  - name: Bills
    description: >
      Operations for managing bills. Bills represent payment requests that can
      be associated

      with customers or specific accounts.
  - name: Webhooks
    description: >
      Webhook events that notify your application of changes in real-time.

      Configure webhook endpoints in your merchant dashboard to receive these
      notifications.
externalDocs:
  description: Complete API Documentation
  url: https://docs.momentco.io/
paths:
  /billing/accounts/{account}:
    parameters:
      - name: account
        in: path
        required: true
        description: >
          Account identifier - either the unique ID provided by Moment or the
          external reference provided by the merchant.
        schema:
          oneOf:
            - $ref: '#/components/schemas/account_id'
            - $ref: '#/components/schemas/external_reference'
    get:
      tags:
        - Accounts
      summary: Retrieve Account
      description: >
        Retrieves detailed information about a specific account by its unique
        identifier or external reference.
      operationId: getAccount
      responses:
        '200':
          $ref: '#/components/responses/account_retrieved'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - BearerAuth: []
components:
  schemas:
    account_id:
      type: string
      description: Unique identifier for an account
      pattern: ^bacc_[a-zA-Z0-9]+$
      example: bacc_H4jp6KnU5cPw263v1jyz4
    external_reference:
      type: string
      description: |
        External reference for reconciliation or tracking purposes.
        Must be unique within your merchant account.
      maxLength: 255
      pattern: ^[a-zA-Z0-9_-]+$
      example: INV-2024-001
    account:
      type: object
      description: >
        An account represents a sub-organization within a customer for separate
        balance tracking and payment management.
      properties:
        id:
          $ref: '#/components/schemas/account_id'
        external_reference:
          $ref: '#/components/schemas/external_reference'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        name:
          $ref: '#/components/schemas/account_name'
        currency:
          $ref: '#/components/schemas/currency'
        balance:
          $ref: '#/components/schemas/balance'
        payment_rules:
          $ref: '#/components/schemas/payment_rules'
        metadata:
          $ref: '#/components/schemas/metadata_fields'
      required:
        - id
        - external_reference
        - customer_id
      additionalProperties: false
    problem_detail:
      title: Problem Detail Object
      type: object
      properties:
        type:
          type: string
          description: >
            A URI reference that identifies the problem type. This URI should
            provide human-readable documentation for the problem type.
        title:
          type: string
          description: |
            A short, human-readable summary of the problem type.
        status:
          type: integer
          description: |
            The HTTP status code applicable to this problem.
        detail:
          type: string
          description: >
            A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: >
            A URI reference that identifies the specific occurrence of the
            problem.
        code:
          type: string
          description: A machine-readable code that describes the specific error condition
          enum:
            - bad_request
            - conflict
            - unauthorized
            - missing_authorization
            - operation_not_allowed
            - resource_not_found
            - resource_already_exists
            - bill_already_voided
            - internal_server_error
            - payment_not_found
          example: bad_request
      required:
        - type
        - title
        - status
      description: |
        A standardized format for problem details, following RFC 9457.
    customer_id:
      type: string
      description: Unique identifier for a customer
      pattern: ^bcus_[a-zA-Z0-9]+$
      example: bcus_H4jp6KnU5cPw263v1jyz4
    account_name:
      type: string
      description: Name for the account
      maxLength: 255
      example: Subscription Account
    currency:
      title: Currency
      type: string
      description: The ISO 4217 currency code for the payment.
      example: ZAR
    balance:
      type: integer
      description: >
        Current balance of the entity. If balance is negative, the entity has
        credit;

        if positive, the entity owes this amount. If not specified, no balance
        tracking.


        The value is in the smallest currency unit (e.g., cents for ZAR).


        **Note:** If balance is specified, the currency field must also be
        provided.
      example: 2000
    payment_rules:
      type: object
      description: >
        Payment rules associated with the entity. If not specified, the entity
        cannot be paid against.
      properties:
        min_amount:
          type: integer
          description: >
            Minimum payment amount in the smallest currency unit (e.g., cents
            for ZAR)
          minimum: 1
          example: 100
        max_amount:
          type: integer
          description: >
            Maximum payment amount in the smallest currency unit (e.g., cents
            for ZAR)
          minimum: 1
          example: 1000000
        underpayment_allowed:
          type: boolean
          description: Whether payments less than the full amount due are allowed
          example: true
        overpayment_allowed:
          type: boolean
          description: Whether payments greater than the amount due are allowed
          example: false
      additionalProperties: false
    metadata_fields:
      type: object
      description: >
        Set of key-value pairs that you can attach to an object. This can be
        useful

        for storing additional information about the object in a structured
        format.

        NEW

        **Limitations:**

        - Maximum 20 keys

        - Key names must be strings (max 40 characters)

        - Values must be strings (max 500 characters)
      additionalProperties:
        type: string
      example:
        customer_id: cust_123456
        order_id: ord_789012
  responses:
    account_retrieved:
      description: Account retrieved successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/account'
          examples:
            Account Retrieved:
              summary: Retrieved account details
              description: Complete account information
              value:
                id: bacc_H4jp6KnU5cPw263v1jyz4
                external_reference: UAR1234567890
                customer_id: bcus_H4jp6KnU5cPw263v1jyz4
                name: Subscription Account
                currency: ZAR
                balance: 2000
                payment_rules:
                  min_amount: 100
                  max_amount: 500000
                  underpayment_allowed: true
                  overpayment_allowed: false
                metadata:
                  account_type: subscription
                  billing_cycle: monthly
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    unauthorized:
      description: Unauthorized - Invalid or missing authentication credentials
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Invalid API Key:
              summary: Invalid API key
              value:
                type: https://docs.momentco.io/errors/unauthorized
                title: Unauthorized
                status: 401
                detail: The API key provided is invalid.
                instance: /billing/customers
                code: unauthorized
            Missing Authorization:
              summary: Missing authorization header
              value:
                type: https://docs.momentco.io/errors/unauthorized
                title: Unauthorized
                status: 401
                detail: Authorization header is required.
                instance: /billing/customers
                code: missing_authorization
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    forbidden:
      description: Forbidden - Operation not allowed for the authenticated user
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Operation Not Allowed:
              summary: Operation not allowed
              value:
                type: https://docs.momentco.io/errors/forbidden
                title: Forbidden
                status: 403
                detail: Merchant is not allowed to perform this action.
                instance: /billing/customers
                code: operation_not_allowed
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    not_found:
      description: Resource not Found - The requested resource does not exist
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Customer Not Found:
              summary: Customer not found
              value:
                type: https://docs.momentco.io/errors/not-found
                title: Resource Not Found
                status: 404
                detail: The requested customer does not exist.
                instance: /billing/customers/bcus_nonexistent123
                code: resource_not_found
            Account Not Found:
              summary: Account not found
              value:
                type: https://docs.momentco.io/errors/not-found
                title: Resource Not Found
                status: 404
                detail: The requested account does not exist.
                instance: /billing/accounts/bacc_nonexistent123
                code: resource_not_found
            Bill Not Found:
              summary: Bill not found
              value:
                type: https://docs.momentco.io/errors/not-found
                title: Resource Not Found
                status: 404
                detail: The requested bill does not exist.
                instance: /billing/bills/bill_nonexistent123
                code: resource_not_found
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    internal_server_error:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Internal Server Error:
              summary: Internal server error
              value:
                type: https://docs.momentco.io/errors/internal-server-error
                title: Internal Server Error
                status: 500
                detail: An unexpected error occurred. Please try again later.
                instance: /billing/customers
                code: internal_server_error
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
  headers:
    request_id:
      description: >
        A unique identifier for the request, used for tracing and debugging
        purposes.

        This `Request-Id` is included in every response to enable request
        tracing across multiple services or systems.

        It helps correlate logs and track the flow of requests through
        distributed systems.

        The value is typically a universally unique identifier (UUID) to ensure
        uniqueness across requests.
      schema:
        type: string
        examples:
          - 63efe730-f599-40a5-afb7-9dda5fc31773
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Authentication using Bearer tokens. Include your API key in the
        Authorization header.


        **Key Types:**

        - **Test Keys**: `sk_test_*` for development and testing

        - **Live Keys**: `sk_*` for production environments

        - **Public Keys**: `pk_test_*` or `pk_*` for client-side operations



        > 📩 **Need access?** [Contact Support](/documentation/support) to
        request your API keys.



        **Usage:**

        ```http

        Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc

        ```

````