> ## 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.

# Update a Billing partner subscription's payment methods

> Request to update an active Billing partner subscription's payment method, returns the updated partner subscription. The billing method must already be associated to the account for which this billing auhtorization has been created.



## OpenAPI

````yaml /marketONE/Amdocs_Media-Commerce-Gateway.yaml put /partnerSubscription/{id}/paymentMethod
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:
  /partnerSubscription/{id}/paymentMethod:
    put:
      tags:
        - partnerSubscription
      summary: Update a Billing partner subscription's payment methods
      description: >-
        Request to update an active Billing partner subscription's payment
        method, returns the updated partner subscription. The billing method
        must already be associated to the account for which this billing
        auhtorization has been created.
      operationId: updateBillingPartnerSubscriptionPaymentMethod
      parameters:
        - name: id
          in: path
          description: The id of the partner subscription record to be updated.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodIdRef'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              description: The content-type of response body.
              style: simple
              explode: false
              schema:
                maxLength: 56
                minLength: 32
                pattern: .*$
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerSubscriptionResponseDto'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model400Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model401Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model403Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model404Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model500Error'
components:
  schemas:
    PaymentMethodIdRef:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
    PartnerSubscriptionResponseDto:
      type: object
      properties:
        partnerSubscriptionId:
          maxLength: 256
          type: string
          description: MarketONE partner service provisioning record identifier.
        partnerCustomerId:
          maxLength: 256
          type: string
          description: MarketONE unique customer identifier per partner.
        organizationId:
          maxLength: 50
          type: string
          description: >-
            The ID of the aggregator organization in MarketONE for which this
            record was created.
        organizationCode:
          type: string
          description: The organization code as set by the  admin in MarketONE.
        partnerOrganizationId:
          type: string
          description: >-
            The ID of the partner organization in MarketONE for which this
            record was created.
        accountId:
          maxLength: 128
          type: string
          description: >-
            The ID of the MarketONE account associated with this partner service
            record. This ID is not returned when the API is called with a
            partner API key. This will be returned withwhen the API is called
            with an aggregator API key.
        accountVid:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription associated with this partner service
            given by SLM in its response.
        subscriptionId:
          maxLength: 128
          type: string
          description: The id of the SLM subscription associated with this partner service.
        subscriptionVid:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription associated with this partner service
            given by SLM in its response.
        subscriptionItemId:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription Item associated with this partner
            service.
        externalPartnerSubscriptionId:
          maxLength: 256
          type: string
          description: >-
            The identifier returned by the partner from the "AddSubscription"
            callback.
        registrationString:
          maxLength: 2048
          type: string
          description: >-
            Information that was sent to the partner as part of the
            "AddSubscription" callback; e.g. registration code
        partnerUrl:
          maxLength: 2048
          type: string
          description: >-
            The optional response value that identifies the Url where user will
            be directed to for entering the registration code and completing the
            registration
        partnerTokenizedUrl:
          maxLength: 2048
          type: string
          description: >-
            The optional response value that identifies the complete one click
            url that can be used by the user for activation of his partner
            subscription.
        partnerCode:
          maxLength: 15
          type: string
          description: The partner code as set by the partner admin in MarketONE.
        productCode:
          maxLength: 128
          type: string
          description: The product code defined by the partner identified by partner code.
        slmProductCode:
          maxLength: 128
          type: string
          description: The offer code defined by the CSP and maintained in SLM.
        createdDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was created.
        updatedDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was updated.
        startServiceDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was created.
        endServiceDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was updated.
        activatedDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner subscription was
            activated (optional)
        serviceStatus:
          maxLength: 50
          type: string
          description: >-
            Status of the partner service MarketONE information. UNPROVISIONED
            indicates that the record was created by the callback response was
            not received. INACTIVE indicates the provisioning callback was
            sucesfully received by the partner service, but it has not been
            claimed by any service user yet. ACTIVE indicates that the service
            entitlement has been sucesfully provisioned, and a partner service
            user has claimed it. CANCELLATION-IN-PROGRESS indicates that the a 
            de-provisioning request is pending. CANCELLED indicates that the
            de-provisioning request confirmation has been received.
          enum:
            - UNPROVISIONED
            - INACTIVE
            - ACTIVE
            - CANCELLATION-IN-PROGRESS
            - CANCELLED
            - UPDATE-IN-PROGRESS
            - PAUSED
            - PAUSE-IN-PROGRESS
            - RESUME-IN-PROGRESS
        state:
          maxLength: 50
          type: string
          description: >-
            Current state of the calls in regards to Create, Cancel and
            Reprovision Subscriptions. Used for state machine orchestration for
            MarketONE managed subscriptions.
        billingStatus:
          maxLength: 50
          type: string
          description: >-
            The status of the OTT billing partner subscription.
            PENDING-VALIDATION - the BILLING partner subscription creation was
            requested by the OTT partner and it requires validation, MarketONE
            triggered the OTP notification, aggregator sends the OTP to the
            consumer. The customer aggregator account details have not yet been
            validated as being correct. E.g. a MSISDN was provided, but we have
            not yet verified it belongs to the user. PENDING-CONFIRMATION -
            MarketONE successfully validated the BILLING partner subscription.
            All the BILLING partner subscription details are validated at this
            point, MarketONE awaiting confirmation from the customer via the OTT
            partner that they wish this partner subscription to be active for
            billing. ACTIVE - the BILLING partner subscription is available for
            billing CANCELLED - the BILLING partner subscription was canceled
            and can no longer be used for charges, but may be used for refunds
            if it had previously been active.
          enum:
            - PENDING-VALIDATION
            - PENDING-CONFIRMATION
            - ACTIVE
            - CANCELLED
        type:
          type: string
          description: >-
            the type of the partner subscription record; ENTITLEMENT - is when
            the partner subscription is represeting a entitlement relationship;
            BILLING - when the partner subscription is representing a billing
            relationship.
          enum:
            - ENTITLEMENT
            - BILLING
        billingPaymentMethod:
          $ref: '#/components/schemas/ID'
        redemptionCodeExpirationTime:
          type: string
          description: >-
            The timestamp (ISO 8601 format) about the partner service redemption
            code will get expiration.
          example: '2025-02-22T17:30:09.000Z'
        retryable:
          type: boolean
          description: Indicates whether the provisioning is retryable in case of failure.
          default: false
        reasonCode:
          type: string
          description: Reason code for partner subscription cancellation.
        metadata:
          $ref: '#/components/schemas/METADATA'
      description: The information managed in MarketONE about partner service provisioning.
    Model400Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
        message:
          type: string
        validationErrors:
          type: array
          items:
            $ref: '#/components/schemas/Model400ValError'
    Model401Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - authentication-required
            - invalid-api-key
            - api-key-not-found
        message:
          type: string
    Model403Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - forbidden
            - access-denied
            - invalid-scope
            - not-permitted
        message:
          type: string
    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.
    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.
    Model400ValError:
      required:
        - code
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  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.