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

# Account eligibility

> MarketONE invokes this endpoint to perform eligibility checks for merchant managed flows



## OpenAPI

````yaml /marketONE/MarketONECSPAdapter.yaml post /v2/account/eligibility
openapi: 3.0.1
info:
  title: MarketONE Reseller Adapter API
  description: >
    # Introduction

    The MarketONE Reseller (CSP) Adapter OpenAPIs are essential interfaces for
    Resellers (Service Providers) to implement for integration with MarketONE.
    Reseller developers can use the provided specifications to build APIs that
    interact with MarketONE. Reseller developers are responsible for writing the
    code to handle requests and responses and ensuring their implementation
    adheres to the specifications.


    Unlike traditional APIs, these APIs are not called by Resellers. Instead,
    MarketONE invokes them to perform operations such as triggering customer
    notifications or subscription lifecycle events. 


    While these APIs offer comprehensive resources for development, they do not
    encompass every possible API call. For information about APIs Resellers can
    call, see the [MarketONE
    OpenAPIs](https://docs.saas.amdocs.com/bundle/MarketONEAPIs/page/index.html).


    For a list of all the APIs Resellers can build and call, see the [API
    Reference for
    Resellers](https://docs.saas.amdocs.com/bundle/b_aggregatorAPIGuide/page/topics/serviceProviderAPIs_r.html). 


    # HTTP Methods


    The MarketONE Reseller (CSP) Adapter OpenAPIs support the following HTTP
    methods:

    | Method | Description |

    | ----------  | ------------------ |

    | GET  | Retrieve resources (as a list or single record fetch) |

    | POST  | Create new resources or update existing ones (overloading during
    create/update is permitted where specified) |


    # Example Request and Response


    ```

    POST /v2/notification/

    Content-Type: application/json

    X-API-KEY: {Insert API KEY here}

    {
      "type": "partnerSubscriptionAdded",
      "parameters": [
        {
          "key": "redemptionUrl",
          "value": "http://www.acme.com/redeem"
        }
      ]
    }


    HTTP/1.1 200 OK

    ```


    # Status Codes

    MarketONE uses the following HTTP response codes to indicate the success or
    failure of an API request.


    | Code | Status | Description |

    | --------  | ------ | ------------------- |

    | **200** | OK | Everything worked as expected. |

    | **201** | OK | Everything worked as expected. |

    | **400** | Bad Request | The request was unacceptable, often due to missing
    a required parameter. Other possibilities include: <ul><li>A parameter
    doesn't fit the data type</li><li>A parameter is outside the maximum or
    minimum boundaries of what can be accepted.</li> |

    | **401** | Unauthorized | Couldn’t authenticate your request. This could be
    due to a wrong or invalid API key. |

    | **403** | Forbidden | Authentication failed. Check your username and
    password. |

    | **404** | Not Found | The requested resource doesn’t exist. |

    | **409** | Conflict | |

    | **429** | Too Many Requests | Too many requests were made to the API too
    quickly. |

    | **500** | Internal Server Error  | |

    | **501** | Not Implemented | |

    | **503** | Service Unavailable | We’re temporarily offline for maintenance.
    Please try again later. |


    # Authentication


    An API key is required for MarketONE to make requests to the MarketONE
    Reseller (CSP) Adapter OpenAPIs. Resellers (Service Providers) need to
    generate an API key using their system and provide the API key during
    [gateway
    configuration](https://docs.saas.amdocs.com/bundle/b_userGuideForResellers/page/topics/gateway_c.html)
    and [webhook
    registration](https://docs.saas.amdocs.com/bundle/b_userGuideForResellers/page/topics/webhooksAbout_c.html)
    in Partner Ecosystem Management. As an alternative, Resellers can
    authenticate using a username and password (basic auth) or OAuth2. 


    # Errors


    All error responses will return an error object.


    ## Attributes


    | Name | Type | Required/Optional | Description |

    | -------  | ------ | ------ | ------ |

    | **code** | string | required | The error type, such as
    \"authentication-required\" (401) or \"not-found\" (404). |

    | **message** | string | required | A human-readable message providing more
    detailed information about the error. |

    | **validationErrors** | object | optional | An array of validation errors
    with **code** and **message** attributes provided. |


    # Tracing Headers


    The following tracing headers can be used for all APIs:


    - **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.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: Released
servers:
  - url: /
security:
  - CSPApiKeyAuth: []
paths:
  /v2/account/eligibility:
    post:
      tags:
        - Account
      summary: Account eligibility
      description: >-
        MarketONE invokes this endpoint to perform eligibility checks for
        merchant managed flows
      operationId: accountEligibility
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountEligibilityRequest'
        required: true
      responses:
        '200':
          description: OK
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400ErrorEligibility'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500Error'
components:
  schemas:
    AccountEligibilityRequest:
      type: object
      properties:
        productCode:
          type: string
          description: Product code to check for eligibilty
          example: GOOG_PLAY
        account:
          $ref: '#/components/schemas/CSPAccountResponse'
    400ErrorEligibility:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
            - eligibility-failed-csp
        message:
          type: string
          enum:
            - Invalid request
            - Payment method not eligible
    500Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - server-error
        message:
          type: string
    CSPAccountResponse:
      required:
        - payment_methods
        - status
      type: object
      properties:
        id:
          maxLength: 128
          type: string
          description: Primary account identifier. Either id or external_id is mandatory.
        external_id:
          maxLength: 128
          type: string
          description: >-
            An additional Aggregator-specified unique identifier for when you
            have two external (non-MarketONE) systems using two different
            identification schemes for the same customer. It can be used in
            place of vid or id. Mandatory in case id is not provided.
        partner_customer_id:
          type: string
          description: >-
            Optional parameter used in case of migration of an existing customer
            and the same partner customer id need to be reused..
        type:
          type: string
          description: Account type
        status:
          type: string
          description: Account status
        email:
          type: string
          description: The email address associated with this Account.
        language:
          type: string
          description: The language (code) preferred for communications.
        name:
          type: string
          description: The name of the customer primarily associated with this Account.
        shipping_address:
          $ref: '#/components/schemas/CSPAddress'
        payment_methods:
          type: array
          description: The payment methods for this Account.
          items:
            $ref: '#/components/schemas/CSPPaymentMethod'
        metadata:
          $ref: '#/components/schemas/METADATA'
      description: >-
        The Account represents a billing relationship with a customer. As such
        it can contain as much or as little information as you collect about
        customers (people or organizations) to which you offer billing and
        subscriptions. Subscriptions and Transactions must belong to an Account
        - as such, Accounts will be required in MarketONE for billing. An
        Account can have any number of children accounts and may have up to one
        parent account. An Account owns the “on file” payment methods to be used
        for billing. Payment Methods can be created at the same time as an
        Account being created or updated, but when updating an existing Payment
        Method the Payment Method Endpoint must be used.
    CSPAddress:
      type: object
      properties:
        name:
          type: string
          description: The name of the person or contact associated with this address.
        line1:
          type: string
          description: Address Line 1
        line2:
          type: string
          description: Address Line 2
        line3:
          type: string
          description: Address Line 3
        city:
          type: string
        county:
          type: string
        district:
          type: string
          description: State, Province, or District
        postal_code:
          type: string
        country:
          type: string
        phone:
          type: string
        fax:
          type: string
        latitude:
          type: number
        longitude:
          type: number
      description: The Address object represents a physical or mailing address.
    CSPPaymentMethod:
      required:
        - active
        - id
        - primary
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - ExternalBilling
            - MerchantAcceptedPayment
            - CarrierBilling
        id:
          $ref: '#/components/schemas/ID'
        external_billing:
          $ref: '#/components/schemas/SCR_ExternalBilling'
        merchant_accepted_payment:
          $ref: '#/components/schemas/SCR_MerchantAcceptedPayment'
        carrier_billing:
          $ref: '#/components/schemas/CarrierBilling'
        active:
          type: boolean
          description: Active and available for use.
        primary:
          type: boolean
          description: Primary/default payment method for the account.
        status:
          type: string
          description: Status of the payment method
          enum:
            - ACTIVE
            - SUSPENDEDLS
            - SUSPENDEDNP
            - INACTIVE
        metadata:
          $ref: '#/components/schemas/METADATA'
    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.
    ID:
      maxLength: 128
      type: string
      description: A unique identifier.
    SCR_ExternalBilling:
      type: object
      properties:
        bill_receiver:
          type: string
          description: >-
            The payment provider. In this case the payment provider is another
            billing system implemented in the integration.
        payment_channel:
          type: string
          description: >-
            The customer paymentChannelId in the billing system. Best practice
            is to set this the same as the Payment Method id.
        financial_account:
          type: string
          description: The customer financial account ID in the billing system.
    SCR_MerchantAcceptedPayment:
      type: object
      properties:
        payment_type:
          type: string
          description: The identifier of the payment processor.
        account:
          type: string
          description: >-
            If applicable the account identifier of the customer that will be
            used for payment.
    CarrierBilling:
      type: object
      properties:
        object:
          type: string
          description: Value is "CarrierBilling"
          enum:
            - CarrierBilling
        phone_number:
          $ref: '#/components/schemas/PhoneNumber'
        encoded_phone_number:
          type: string
          description: >-
            Read Only. The payment provider-encoded phone number used in the
            Transaction.
        carrier:
          type: string
          description: >-
            The identifier for the carrier, either read from the phone or
            entered by the customer.
        payment_provider:
          $ref: '#/components/schemas/PaymentProvider'
        currency:
          type: string
          description: >-
            ISO 4217 Currency Code for either the static_price_inc_salestax, or
            the dynamic_target_price. (For dynamic pricing, the customer
            currency will be determined by the customer region/countryCode.)
        country_code:
          type: string
          description: ISO 3166-1 alpha-2 Country Code for the customer’s location.
        price_criteria:
          $ref: '#/components/schemas/PriceCriteria'
        account_identifier:
          maxLength: 255
          type: string
          description: Unique billing account identifier from Payment Provider BSS.
          nullable: false
        carrier_billing_account_identifier_type:
          type: string
          description: the type of the account_identifier. Enumerated.
          example: MSISDN
          enum:
            - BAN
            - MSISDN
        customer_identifier:
          maxLength: 255
          type: string
          description: >
            Unique MSISDN or other billing account identifier from Payment
            Provider's BSS.
          nullable: true
          example: not yet available - see VIN-26551
        customer_identifier_type:
          maxLength: 255
          type: string
          description: >
            Identifier for the channel from which the customer_identifier value
            originated
          nullable: true
          example: PoS , Web
        validated:
          type: string
          description: Indicates if the payment method is validated
          nullable: true
      description: This object defines Telco carrier billing details.
    PhoneNumber:
      required:
        - area_code
        - country_code
        - extension
        - local_number
        - object
        - phone_type
      type: object
      properties:
        object:
          type: string
          description: Value is "PhoneNumber"
          enum:
            - PhoneNumber
        phone_type:
          type: string
          description: >-
            Type or Use designation for the phone number. Value can be CS, Fax,
            Home, Main, Mobile, Pager, Unspecified, Work
          enum:
            - CS
            - Fax
            - Home
            - Main
            - Mobile
            - Pager
            - Unspecified
            - Work
        country_code:
          maxLength: 8
          pattern: ^\d+$
          type: string
          description: Country Code segment of a phone number.
        area_code:
          maxLength: 8
          pattern: ^\d+$
          type: string
          description: Area Code segment of a phone number.
        local_number:
          maxLength: 16
          pattern: ^\d+$
          type: string
          description: Local segment of a phone number (excluding extension).
        extension:
          maxLength: 16
          pattern: ^\d+$
          type: string
          description: Phone number extension.
        raw_input:
          type: string
          description: Raw, unfiltered data input by customer.
      description: >-
        The payment providers object represents processor or payment channel
        used to transact a particular charge.
    PaymentProvider:
      type: object
      properties:
        object:
          type: string
          description: Value is "PaymentProvider"
          enum:
            - PaymentProvider
        name:
          type: string
          description: Provider Name
        dispute_address:
          type: string
          description: Contact address for written disputes.
        dispute_email:
          type: string
          description: Contact email for electronic disputes.
        dispute_uri:
          type: string
          description: Contact URL for online disputes.
        auth_expiration_days:
          type: integer
          description: Default expiration timing (days) for un-captured authorizations.
        auth_currency_override:
          type: string
          description: Currency override for Authorizations
        metadata:
          type: object
          description: >-
            A set of key/value pairs that you can attach to an object. Useful
            for storing additional information.
      description: >-
        The payment providers object represents processor or payment channel
        used to transact a particular charge.
    PriceCriteria:
      type: object
      properties:
        object:
          type: string
          description: Value is "PriceCriteria"
          enum:
            - PriceCriteria
        payment_provider:
          $ref: '#/components/schemas/PaymentProvider'
        currency:
          type: string
          description: >-
            ISO 4217 Currency Code for for either the static_price_inc_salestax,
            or the dynamic_target_price Overrides CarrierBilling.currency.
        country_code:
          type: string
          description: >-
            ISO 3166-1 alpha-2 countryCode for customer location. Overrides
            CarrierBilling.countryCode.
        price_point_deviation_policy:
          type: string
          description: >-
            The price deviation policy for dynamic price selection. Value can be
            HiOnly, HiPreferred, LowOnly, LowPreferred, NearestNoPreference
          enum:
            - HiOnly
            - HiPreferred
            - LowOnly
            - LowPreferred
            - NearestNoPreference
        dynamic_price_mode:
          type: string
          description: >-
            Specifies which price point element is matched by the dynamic
            pricing algorithm. Values can be PayoutGross, PayoutNet, Price
          enum:
            - PayoutGross
            - PayoutNet
            - Price
        merchant_service_identifier:
          type: string
          description: Service identifier for Payment Provider/Merchant.
        sub_merchant_identifier:
          type: string
          description: Optional identifier of sub-merchant associated with Transaction.
        description:
          type: string
          description: ''
        fwd_url:
          type: string
          description: >-
            Overrides both the successful transaction forward-to URL and the
            failed transaction forward-to URL.
        static_selection_row_ref:
          type: integer
          description: Row number identifier in the static product/service price matrix
        static_price_inc_sales_tax:
          type: string
          description: >-
            Price including tax (the actual amount the consumer will pay). Used
            with Transactions with static ‘exact match’ pricing.
          format: decimal
        dynamic_deviation:
          type: integer
          description: >-
            The percent deviation (+/- 1000) from the target value that is
            acceptable as a price point selection.
        dynamic_match:
          type: integer
          description: >-
            The percent deviation (+/- 1000) from the target value that is
            classified as an exact match.
        dynamic_target_price:
          type: string
          description: Target price in the specified currency for dynamic pricing.
          format: decimal
      description: Price Criteria details used with telco carrier billing payment methods.
  securitySchemes:
    CSPApiKeyAuth:
      type: apiKey
      description: The authorization key obtained from the CSP organization.
      name: X-API-KEY
      in: header

````

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