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

# Get purchased subscription billing details

> Get a purchased subscription's billing details



## OpenAPI

````yaml /marketONE/Amdocs_Media-Commerce-Gateway.yaml get /subscription/{autobillId}/billingDetail
openapi: 3.0.1
info:
  title: ULM Storefront Gateway
  description: >
    These APIs allow clients to perform purchase and payment method management;
    OTT service and billing authorization operations. These APIs require a user
    access token. The APIs are thus aware of and therefore authorized by this
    ULM context (a user's entitlements as defined in the ULM platform service).


    <b>The following tracing headers can be used for all APIs:</b>


    X-B3-TraceId: The TraceId indicates the overall ID of the trace. Every span
    in a trace shares this ID. The X-B3-TraceId header is encoded as 32 or 16
    lower-hex characters. For example, a 128-bit TraceId header might look like
    463ac35c9f6413ad48485a3953bb6124.


    X-B3-SpanId: The SpanId is 64-bit in length and indicates the position of
    the current operation in the trace tree. The value should not be
    interpreted; it may or may not be derived from the value of the TraceId. The
    X-B3-SpanId header is encoded as 16 lower-hex characters. For example, a
    SpanId header might look like a2fb4a1d1a96d312. Unless propagating only the
    Sampling State, the X-B3-SpanId header is required.


    X-B3-ParentSpanId: The ParentSpanId is 64-bit in length and indicates the
    position of the parent operation in the trace tree. When the span is the
    root of the trace tree, there is no ParentSpanId. The X-B3-ParentSpanId
    header may be present on a child span and must be absent on the root span.
    It is encoded as 16 lower-hex characters. For example, a ParentSpanId header
    might look like 0020000000000001.


    <b>The APIs can be accessed via a tenant specific domain or the
    X-Aggregator-Code header must specify a MarketONE organization code:</b>


    X-Aggregator-Code: The aggregator organization code. Organization code must
    be provided either via HTTP header or query parameter. If both are provided,
    HTTP header will be used.


    aggregatorCode: The aggregator organization code. Organization code must be
    provided either via HTTP header or query parameter. If both are provided,
    HTTP header will be used.
  version: Latest
servers:
  - url: https://default.ulm.stg.m1amdocs.io/storefront
security:
  - bearerAuth: []
paths:
  /subscription/{autobillId}/billingDetail:
    get:
      tags:
        - subscription
      summary: Get purchased subscription billing details
      description: Get a purchased subscription's billing details
      operationId: getUserSubscriptionBillingDetails
      parameters:
        - name: autobillId
          in: path
          description: The autobillId of the Subscription.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionBillingDetails'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model400Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelGenericError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model404Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model500Error'
      security:
        - bearerAuth:
            - storefront
components:
  schemas:
    SubscriptionBillingDetails:
      required:
        - id
        - vid
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
        vid:
          $ref: '#/components/schemas/VID'
        created:
          type: string
          description: The date/time at which the subscription was requested.
        status:
          type: string
          description: >-
            The status of the subscription from a service and entitlement
            perspective.
          enum:
            - Pending Activation
            - Active
            - Paused
            - Pending Pause
            - Pending Resume
            - Pending Cancel
            - Cancelled
            - Expired
            - Processing
            - Deleted
            - Dryrun
            - Unknown
            - Upgraded
            - Legacy Suspended
            - Bogus AutoBill Status
        payment_method:
          $ref: '#/components/schemas/PaymentMethodRef'
        billing_plan:
          $ref: '#/components/schemas/BillingPlan'
        billing_state:
          type: string
          description: The financial state of the subscription.
          enum:
            - Free/Trial
            - Billing Completed
            - Failed To Collect
            - Free Period
            - Paused
            - Good Standing
            - Grace Period
            - In Retry
            - Legacy Unknown BillingState
            - Overdue
            - Pending Acceptance
            - Terminated
            - Unbilled
            - Unknown
            - Unusable PaymentMethod
            - Pending Resume
            - Pending Pause
            - Bogus BillingState
        starts:
          type: string
          description: The date/time the subscription starts service.
        ends:
          type: string
          description: The date/time the subscription ends service.
        entitled_through:
          type: string
          description: >-
            The date/time to which the subscription will entitle service if no
            further payments are made – a “paid thru” date based on billing
            schedule and grace period.
        billing_day:
          type: integer
          description: >-
            The day of the month on which the subscription is (typically)
            billed. Often called an “anniversary date.”
        minimum_commitment:
          type: integer
          description: >-
            Number of billing cycles customer is obligated to maintain the
            subscription. Cancelling before this time requires aggregator to
            “force” cancellation.
        most_recent_billing:
          $ref: '#/components/schemas/MarketplaceTransaction'
        next_billing:
          $ref: '#/components/schemas/MarketplaceTransaction'
        balance:
          type: number
      description: Subscription billing details.
    Model400Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
        message:
          type: string
        validationErrors:
          type: array
          items:
            $ref: '#/components/schemas/Model400ValError'
    ModelGenericError:
      required:
        - code
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      description: The object contains information about the error.
    Model404Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - not-found
        message:
          type: string
    Model500Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - server-error
        message:
          type: string
    ID:
      maxLength: 256
      type: string
      description: A unique identifier.
    VID:
      maxLength: 128
      type: string
      description: >-
        A Globally Unique Identifier (GUID) for this object. This value is
        generated by MarketONE.
    PaymentMethodRef:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
        vid:
          $ref: '#/components/schemas/VID'
    BillingPlan:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
        vid:
          $ref: '#/components/schemas/VID'
        object:
          type: string
          description: Value is “BillingPlan”
          enum:
            - BillingPlan
        created:
          type: string
          description: The date and time the plan was created.
        description:
          type: string
          description: A CSP-specified description of this offering.
        status:
          type: string
          description: >-
            CSPs may define whether they want to declare a plan as available to
            offer. Values can be Active,Suspended
          enum:
            - Active
            - Suspended
        tax_classification:
          type: string
          description: >-
            The tax classification or code to be used with any plan-level
            charges.
        br_tax_category:
          type: string
          description: enum(Category)
        trial:
          $ref: '#/components/schemas/BillingPlanPeriod'
        periods:
          $ref: '#/components/schemas/BillingPlan_periods'
        billing_notification_days:
          type: integer
          description: >-
            Number of days prior to schedule billing at which CashBox will send
            email notification.
        trial_end_notification_days:
          type: integer
          description: >-
            For the trial period, this replaces billing_notification_days,
            indicating the number of days prior to end of a trial to send the
            trial end email.
        skip_initial_billing_notification:
          type: boolean
          description: >-
            Determines whether to send a billing notification for the initial
            period.
        end_of_life:
          type: string
          description: The date after which the plan should not be offered.
        metadata:
          $ref: '#/components/schemas/METADATA'
        billing_descriptor:
          type: string
          description: >-
            Optional “soft descriptor” to send to the payment processor for
            transactions associated with a subscription using this billing plan.
        times_to_run:
          type: string
          description: >-
            The number of times the sequence of Billing Periods should be
            repeated. Valid input includes positive integers (Default is null).
        entitlements_valid_for:
          type: string
          description: >-
            The length of time for which Entitlements are valid after the last
            Billing date (Default is null).
        repeat_every:
          type: string
          description: >-
            If a Billing Period set repeats, this value defines the length of
            time after the first billing that the set should repeat.
        days_before_season_to_bill:
          type: integer
          description: >-
            Optional setting when using a season set to control the integer
            number of days before a season starts to bill.
        days_entitled_before_season:
          type: integer
          description: >-
            Optional setting when using a season set to control the integer
            number of days customer is entitled before a season starts
        days_entitled_after_season:
          type: integer
          description: >-
            Optional setting when using a season set to control the integer
            number of days after a season ends a customer remains entitled.
        entitled_off_season:
          type: boolean
          description: >-
            Optional setting when using a season set to continue entitling
            customer between seasons.
        used_on_subscriptions:
          type: boolean
          description: Signifies if Billing Plan has been used on an Active Subscription
        grace_period_override:
          type: integer
          description: >-
            Number of days after the billing date when, if payment is not
            received, the Subscription is stopped and the customer is
            disentitled; overrides the global CSP default setting, if both are
            set.
    MarketplaceTransaction:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
        vid:
          $ref: '#/components/schemas/VID'
        created:
          type: string
          description: The time this transaction was initiated.
        amount:
          type: number
          description: >-
            The net amount of the charge presented by this transaction, as a
            decimal. Must be positive (zero allowed).
        original_amount:
          type: number
          description: >-
            Used with a partial payment; this read-only field reflects the
            original amount of the transaction, as a decimal.
        currency:
          type: string
          description: >-
            The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) Currency Code
            of this transaction
        items:
          type: array
          description: >-
            The array of Transaction Items belonging to this transaction. Items
            correspond to the charges, discounts, credits, and taxes.
          items:
            $ref: '#/components/schemas/MarketplaceTransactionItem'
      description: The Transaction object returning information about a customer charge.
    Model400ValError:
      required:
        - code
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    BillingPlanPeriod:
      type: object
      properties:
        object:
          type: string
          description: Value is “BillingPlanPeriod”
          enum:
            - BillingPlanPeriod
        type:
          type: string
          description: Unit of time a period describes. Values can be Day,Week,Month,Year
          enum:
            - Day
            - Week
            - Month
            - Year
        quantity:
          type: integer
        cycles:
          type: integer
        prices:
          $ref: '#/components/schemas/BillingPlan_prices'
    BillingPlan_periods:
      type: object
      properties:
        object:
          type: string
          description: Must be "List"
          enum:
            - List
        total_count:
          type: integer
          description: Integer count of the number of items in the returned list.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BillingPlanPeriod'
    METADATA:
      type: object
      additionalProperties:
        type: string
        properties:
          key:
            type: string
          value:
            type: string
      description: >-
        A set of key/value pairs that you can attach to an object. Useful for
        storing additional information.
    MarketplaceTransactionItem:
      type: object
      properties:
        sku:
          type: string
          description: >-
            The SKU or unique identifier of the product purchased with this item
            (for one-time transactions this is an ad-hoc value.
        index_number:
          type: integer
          description: Sequential index of all items on the transaction.
        item_type:
          type: string
        name:
          type: string
          description: CSP-provided name or inherited description of the product purchased
        price:
          type: number
          description: unit price of this item
        metadata:
          $ref: '#/components/schemas/METADATA'
        quantity:
          type: number
          description: >-
            The unit quantity for the item; for license-based products this is
            the license/seat quantity.
        tax_classification:
          type: string
          description: The tax code or classification applicable to this item.
        campaign_code:
          type: string
          description: Campaign code redeemed on this TransactionItem.
        campaign_id:
          type: string
          description: The unique identifier for a campaign applied to this item.
        campaign_description:
          type: string
          description: >-
            Detailed description of the campaign for the discount on this item,
            if there is one.
        service_period_starts:
          type: string
          description: The start date for the period the charge on this item covers.
        service_period_ends:
          type: string
          description: The end date for the period the charge on this item covers.
        tax_type:
          type: string
          description: Fixed Tax definition (read only).
        tax:
          type: array
          description: >-
            array to list the individual tax items associated with the
            corresponding transactionItem.
          items:
            $ref: '#/components/schemas/TaxItem'
        discount:
          type: number
          description: The total discount amount applied to this item.
        subtotal:
          type: number
          description: The pre-tax (post-discount) subtotal.
        total:
          type: number
          description: The grand total of this item
    BillingPlan_prices:
      type: object
      properties:
        object:
          type: string
          description: Must be "List"
          enum:
            - List
        total_count:
          type: integer
          description: Integer count of the number of items in the returned list.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BillingPlanPrice'
    TaxItem:
      type: object
      properties:
        object:
          type: string
          description: Value is “TaxItem”
        jurisdiction:
          type: string
          description: Tax jurisdiction
        name:
          type: string
          description: Tax description
        amount:
          type: number
          description: Currency amount of assessed tax
        external_tax_name:
          type: string
        external_tax_category:
          type: string
        external_jurisdiction_name:
          type: string
        tax_rate:
          type: number
      description: And individual tax assessed for a specified jurisdiction.
    BillingPlanPrice:
      type: object
      properties:
        object:
          type: string
          description: Value is “BillingPlanPrice”
        amount:
          type: number
          description: price
        currency:
          type: string
          description: >-
            The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) Currency Code
            of price.
        price_list_name:
          type: string
          description: >-
            Name of price list containing this price. This is free-form string
            of 255 characters or less
        token_amount:
          $ref: '#/components/schemas/TokenAmount'
    TokenAmount:
      type: object
      properties:
        object:
          type: string
          enum:
            - TokenAmount
        token:
          $ref: '#/components/schemas/Token'
        amount:
          type: integer
          description: The balance of tokens in the grant.
        source:
          type: string
      description: >-
        The TokenAmount object represents the token-based credit detail
        associated with a particular grant of token credits.
    Token:
      type: object
      properties:
        object:
          type: string
          description: Value is “Token”
          enum:
            - Token
        id:
          $ref: '#/components/schemas/ID'
        vid:
          $ref: '#/components/schemas/VID'
        description:
          type: string
          description: Text describing the token type
      description: >-
        The token object provides a way to offer virtual currencies or track the
        balance of a consumable service item.
  securitySchemes:
    bearerAuth:
      type: oauth2
      description: OAuth 2.0 Authentication
      flows:
        authorizationCode:
          authorizationUrl: /oidc/authorize
          tokenUrl: /oidc/token
          scopes:
            storefront: gives access to user api in storefront
            storefront-csr: gives access to some csr api in storefront
            m2m.storefront.csr.manage: Allows the machine to create and manage(CRUD)
            m2m.storefront.csr.read: Allows the machine to read data only

````

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