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

# Charge

> Execute a charge .



## OpenAPI

````yaml /openapi/current/dvm/dvm-to-reseller/charge/openapi.json post /charges
openapi: 3.1.0
info:
  title: DVM to Reseller - Charge API
  summary: Current / DVM / DVM to Reseller / Charge
  description: |

    # Overview

    API endpoints that need to be implemented by a reseller to:

    * approve or decline a charge
    * approve or decline a refunds
  version: 1.0.0
servers: []
security: []
tags:
  - name: Charge and refund
    description: Charge and refund API exposed by the reseller
paths:
  /charges:
    post:
      tags:
        - Charge and refund
      summary: Charge
      description: Execute a charge .
      operationId: charge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerOfferCharge'
            examples:
              Consumer offer first bill charge:
                value:
                  requestId: 218958bf-6eaf-4b21-bcba-40982aa7eb51
                  billEffectiveDate: '2026-01-01T01:00:00.000Z'
                  billType: FIRST_BILL
                  billId: 347d18b7-3166-428c-b0c5-293ab25bf28b
                  chargeId: a6d6654f-3dfa-4db8-8953-a81a13256fd4
                  chargeAttempt: 0
                  isRetry: false
                  amount: 1999
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_STD
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-01-01T01:00:00.000Z'
                      endDate: '2026-02-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER
                      quantity: 1
                      amount: 1999
                      currency: USD
                      consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
              Consumer offer renew:
                value:
                  requestId: a95ec4ff-ac07-40ac-905c-0bbfdfacf409
                  billEffectiveDate: '2026-02-01T01:00:00.000Z'
                  billType: RENEWAL
                  billId: b0060ac6-9464-4297-9213-a3d8139e1438
                  chargeId: 0b6d75ac-75ba-4a29-89a4-c2ba34f7712c
                  chargeAttempt: 0
                  isRetry: false
                  amount: 1999
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_STD
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-02-01T01:00:00.000Z'
                      endDate: '2026-03-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER
                      quantity: 1
                      amount: 1999
                      currency: USD
                      consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
              Consumer offer renew retry:
                value:
                  requestId: 81cadcc5-bda8-4de6-837a-3660a429e6b5
                  billEffectiveDate: '2026-02-01T01:00:00.000Z'
                  billType: RENEWAL
                  billId: b0060ac6-9464-4297-9213-a3d8139e1438
                  chargeId: e5fb3a84-5c01-4c69-9ec0-885d9cd0c3b9
                  chargeAttempt: 1
                  isRetry: true
                  amount: 1999
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_STD
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-02-01T01:00:00.000Z'
                      endDate: '2026-03-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER
                      quantity: 1
                      amount: 1999
                      currency: USD
                      consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
              Consumer offer pro-rated upgrade charge:
                value:
                  requestId: b1d24b6c-2e01-4071-8d25-dca97b5b04b5
                  billEffectiveDate: '2026-02-15T11:16:45.000Z'
                  billType: PRO_RATED_CHARGE
                  billId: 160cb4e5-0cf5-451c-a72b-3ed41794f00a
                  chargeId: 19e3e3d4-6f8c-4cc9-bf18-6547a7bc977d
                  chargeAttempt: 0
                  isRetry: false
                  amount: 350
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_PREMIUM
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-02-01T01:00:00.000Z'
                      endDate: '2026-03-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER_TIER_CHANGE_PRORATION
                      quantity: 1
                      amount: 350
                      currency: USD
                      entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
              Consumer offer renew after upgrading:
                value:
                  requestId: f8e7d6c5-b4a3-4c2b-8d1e-9f0a1b2c3dff
                  billEffectiveDate: '2026-03-01T01:00:00.000Z'
                  billType: RENEWAL
                  billId: a56c91f6-1357-42d0-9818-5198d7e54902
                  chargeId: c699aa49-35ea-4a23-9c3e-4479413db91d
                  chargeAttempt: 0
                  isRetry: false
                  amount: 2699
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_PREMIUM
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-03-01T01:00:00.000Z'
                      endDate: '2026-04-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER
                      quantity: 1
                      amount: 1999
                      currency: USD
                      consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    - lineItemType: OFFER_ENTITLEMENT_TIER_DELTA
                      quantity: 1
                      amount: 700
                      currency: USD
                      entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
              Consumer offer renew after downgrading:
                value:
                  requestId: b8d579e9-c937-4be9-a1de-eb5214c50ab8
                  billEffectiveDate: '2026-04-01T01:00:00.000Z'
                  billType: RENEWAL
                  billId: f0c4f625-e9f4-4ed6-92b2-fca4570d550f
                  chargeId: 32dfaaeb-a5ef-4379-a634-3503320f2c81
                  chargeAttempt: 0
                  isRetry: false
                  amount: 899
                  currency: USD
                  consumer:
                    consumerIdentifier: RFBNZ2MU3Y35OA5GNNNGETK6JTEVRYVB
                    billingIdentifier: BWNMJXEDAO7HTK6Q4SBAOEJMPGURUB3K
                  resourceType: CONSUMER_OFFER
                  consumerOffer:
                    consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    offerId: 7560fca0-d8a9-4124-a172-924debec874e
                    entitlements:
                      - entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
                        contentProviderId: NETFLIX
                        productId: 0d83e344-62b3-44a8-adb5-59b835ef6cf7
                        productTierKey: NETFLIX_STD_ADS
                  billingDetails:
                    planType: SUBSCRIPTION
                    billingPeriod:
                      phaseType: FULL_PRICE
                      duration: P1M
                      renewalFrequency: P1M
                      startDate: '2026-04-01T01:00:00.000Z'
                      endDate: '2026-05-01T00:59:59.999Z'
                  lineItems:
                    - lineItemType: OFFER
                      quantity: 1
                      amount: 1999
                      currency: USD
                      consumerOfferId: 338d31e1-a289-40dd-beff-ab41c1fc5f51
                    - lineItemType: OFFER_ENTITLEMENT_TIER_DELTA
                      quantity: 1
                      amount: -1100
                      currency: USD
                      entitlementId: b0163d06-1fa3-4c9b-a298-29635ca7151d
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChargeApprovedResponse'
                  - $ref: '#/components/schemas/ChargeDeclinedResponse'
                title: Response 200 Charge
                description: Charge Synchronous Response.
                discriminator:
                  propertyName: responseCode
                  mapping:
                    APPROVED:
                      $ref: '#/components/schemas/ChargeApprovedResponse'
                    DECLINED:
                      $ref: '#/components/schemas/ChargeDeclinedResponse'
              examples:
                Approved:
                  value:
                    requestId: f8e7d6c5-b4a3-4c2b-8d1e-9f0a1b2c3dff
                    responseCode: APPROVED
                    partnerChargeId: 3c2f7004-d464-4191-863a-32cb5108c935
                Declined:
                  value:
                    requestId: f8e7d6c5-b4a3-4c2b-8d1e-9f0a1b2c3dff
                    responseCode: DECLINED
                    partnerChargeId: 3c2f7004-d464-4191-863a-32cb5108c935
                    reason: USER_SUSPENDED
                    reasonDescription: User is suspended
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeAsyncResponse'
              examples:
                Accepted for asynchronous processing:
                  value:
                    requestId: f8e7d6c5-b4a3-4c2b-8d1e-9f0a1b2c3dff
                    partnerChargeId: 3c2f7004-d464-4191-863a-32cb5108c935
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
              examples:
                Invalid JSON:
                  value:
                    errors:
                      - code: invalid-json
                        message: Invalid JSON
                        originator: PARTNER
                        metadata: {}
                Missing parameter:
                  value:
                    errors:
                      - code: missing-parameter
                        message: Missing parameter
                        originator: PARTNER
                        metadata:
                          missingParam: checkoutId
                Invalid parameter:
                  value:
                    errors:
                      - code: invalid-parameter
                        message: Invalid parameter
                        originator: PARTNER
                        metadata:
                          invalidParam: checkoutParameters.checkoutCallbackUrl
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
              examples:
                Unauthorized:
                  value:
                    errors:
                      - code: invalid-credentials
                        message: Invalid credentials
                        originator: PARTNER
                        metadata: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
              examples:
                Forbidden:
                  value:
                    errors:
                      - code: permission-denied
                        message: Permission denied
                        originator: PARTNER
                        metadata: {}
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              examples:
                Not found:
                  value:
                    errors:
                      - code: not-found
                        message: Not found
                        originator: PARTNER
                        metadata: {}
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
              examples:
                Conflict:
                  value:
                    errors:
                      - code: conflict
                        message: Conflict
                        originator: PARTNER
                        metadata: {}
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
              examples:
                Too Many Requests:
                  value:
                    errors:
                      - code: too-many-requests
                        message: Too many requests
                        originator: PARTNER
                        metadata: {}
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalErrorResponse'
              examples:
                Internal error:
                  value:
                    errors:
                      - code: internal-server-error
                        message: Internal server error
                        originator: PARTNER
                        metadata: {}
                Partner failure:
                  value:
                    errors:
                      - code: partner-failure
                        message: Partner failure
                        originator: PARTNER
                        metadata: {}
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureNotImplementedResponse'
              examples:
                Not Implemented:
                  value:
                    errors:
                      - code: not-implemented
                        message: Not implemented
                        originator: PARTNER
                        metadata: {}
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnvavailableResponse'
              examples:
                Service Unavailable:
                  value:
                    errors:
                      - code: service-unavailable
                        message: Service unavailable
                        metadata: {}
                        originator: PARTNER
      security:
        - APIKeyHeader: []
        - HTTPBasic: []
        - OAuth2PasswordBearer: []
components:
  schemas:
    ConsumerOfferCharge:
      properties:
        externalRecurringChargeId:
          type: string
          title: External Recurring Charge ID
          description: >-
            Partner-generated identifier of the authorization for recurring
            charges.
        requestId:
          type: string
          title: Request ID
          description: >-
            Bango-generated Request ID (UUID v4). Should be returned in the API
            response.This allows correalating individual requests and responses.
        billEffectiveDate:
          type: string
          title: Bill Effective Date
          description: Date the bill was generated for.
        billType:
          $ref: '#/components/schemas/ConsumerOfferChargeBillType'
          title: Bill Type
          description: |-
            Bill type:

            * `FIRST_BILL`: First bill for this consumer offer
            * `RENEWAL`: Renewal bill
            * `PRO_RATED_CHARGE`: Triggered on product or tier changes
          examples:
            - RENEWAL
        billId:
          type: string
          title: Bill ID
          description: >-
            Bango-generated unique bill identifier (UUID v4).If the initial
            charge fails, all subsequent retries will have the same billId.
        amount:
          type: integer
          title: Amount
          description: Charge amount, in minor units
        currency:
          type: string
          title: Currency
          description: Currency code (ISO 4217)
        resourceType:
          type: string
          const: CONSUMER_OFFER
          title: Charged Resource Type
          description: Type of resource that is being charged.
        consumer:
          anyOf:
            - $ref: '#/components/schemas/ConsumerWithBillingIdentifier'
            - $ref: '#/components/schemas/ConsumerWithPhoneNumber'
          title: Consumer
          description: Consumer information
        chargeId:
          type: string
          title: Charge ID
          description: >-
            Bango-generated unique identifier of the charge transaction (UUID
            v4). There could be more than one charge per bill. 
          examples:
            - c699aa49-35ea-4a23-9c3e-4479413db91d
        chargeAttempt:
          type: integer
          title: Charge Attempt
          description: >-
            Charge attempt. 0 if it's the first attempt, 1 for the first
            retry...
          examples:
            - 0
        isRetry:
          type: boolean
          title: Is Retry
          description: Whether this is a retry of a charge
          examples:
            - false
        consumerOffer:
          $ref: '#/components/schemas/ConsumerOfferSummary'
          title: Consumer Offer
          description: Consumer offer details
        billingDetails:
          $ref: '#/components/schemas/ConsumerOfferBillingDetail'
          title: Billing Details
          description: Billing details
        lineItems:
          items:
            oneOf:
              - $ref: '#/components/schemas/LineItemForOffer'
              - $ref: '#/components/schemas/LineItemForTierChangeProration'
              - $ref: '#/components/schemas/LineItemForEntitlementTierDelta'
            discriminator:
              propertyName: lineItemType
              mapping:
                OFFER:
                  $ref: '#/components/schemas/LineItemForOffer'
                OFFER_ENTITLEMENT_TIER_DELTA:
                  $ref: '#/components/schemas/LineItemForEntitlementTierDelta'
                OFFER_TIER_CHANGE_PRORATION:
                  $ref: '#/components/schemas/LineItemForTierChangeProration'
          type: array
          title: Line Items
          description: List of line items
      type: object
      required:
        - requestId
        - billEffectiveDate
        - billType
        - billId
        - amount
        - currency
        - resourceType
        - consumer
        - chargeId
        - chargeAttempt
        - isRetry
        - consumerOffer
        - billingDetails
        - lineItems
      title: ConsumerOfferCharge
      description: Execute a charge for a consumer offer bill.
    ChargeApprovedResponse:
      properties:
        requestId:
          type: string
          title: Request ID
          description: >-
            Bango-generated Request ID (UUID v4). Should be returned in the API
            response.This allows correalating individual requests and responses.
        responseCode:
          type: string
          const: APPROVED
          title: Response Code
          description: Result of the operation
        partnerChargeId:
          type: string
          title: Partnerchargeid
          description: Unique identifier of the charge operation, generated by reseller.
      type: object
      required:
        - requestId
        - responseCode
      title: ChargeApprovedResponse
      description: Charge approved response.
    ChargeDeclinedResponse:
      properties:
        requestId:
          type: string
          title: Request ID
          description: >-
            Bango-generated Request ID (UUID v4). Should be returned in the API
            response.This allows correalating individual requests and responses.
        responseCode:
          type: string
          const: DECLINED
          title: Response Code
          description: Result of the operation
        reason:
          $ref: '#/components/schemas/ChargeDeclineReason'
          title: Decline Reason
          description: >
            Decline reason


            * `DENIED`: The charge was declined. This is a general denial that
            doesn't fall into a more specific category. We recommend using a
            more specific reason. Bango will not retry the charge.

            * `USER_INVALID`: The user identifier provided is not recognized or
            corresponds to a deactivated account. This may occur if the user's
            account has been closed or the identifier is incorrect. Bango will
            not retry this error.

            * `USER_BARRED`: The user has been permanently barred from using the
            payment method. This is a permanent restriction. Bango will not
            retry this charge.

            * `USER_SUSPENDED`: The user's account is temporarily suspended from
            making payments. Unlike a permanent bar, this restriction may be
            lifted once the user resolves any outstanding issues. Bango will
            retry this charge.

            * `USER_NOT_ENABLED`: The user has not been enabled for direct
            carrier billing or the specific payment method being used. They may
            need to activate this service with their payment provider before
            transactions can be processed. Bango will retry this charge.

            * `USER_INSUFFICIENT_CREDIT`: The user does not have sufficient
            funds or credit available to complete the purchase. They'll need to
            add funds to their account or use an alternative payment method.
            Bango will retry this charge.

            * `USER_SPEND_LIMIT_EXCEEDED`: The user has reached the spending
            limit imposed by their payment provider. This could be a daily,
            weekly, or monthly limit. Bango will retry this charge.

            * `ALREADY_IN_PROGRESS`: A charge with the same `chargeId` is
            already being processed. This prevents duplicate charges and
            indicates Bango should wait for the current operation to complete
            before retrying.
          examples:
            - USER_SUSPENDED
        reasonDescription:
          type: string
          title: Decline Reason Description
          description: >-
            In case responseCode is DECLINED, human-readable reason for
            declining.
          examples:
            - Insufficient credit
        partnerChargeId:
          type: string
          title: Partnerchargeid
          description: Unique identifier of the charge operation, generated by reseller.
      type: object
      required:
        - requestId
        - responseCode
      title: ChargeDeclinedResponse
      description: Charge declined response.
    ChargeAsyncResponse:
      properties:
        requestId:
          type: string
          title: Request ID
          description: >-
            Bango-generated Request ID (UUID v4). Should be returned in the API
            response.This allows correalating individual requests and responses.
        partnerChargeId:
          type: string
          title: Partnerchargeid
          description: Unique identifier of the charge operation, generated by reseller.
      type: object
      required:
        - requestId
      title: ChargeAsyncResponse
      description: Charge accepted for asynchronous processing.
    BadRequestResponse:
      properties:
        errors:
          items:
            anyOf:
              - $ref: '#/components/schemas/InvalidJsonError'
              - $ref: '#/components/schemas/MissingParameterError'
              - $ref: '#/components/schemas/InvalidParameterError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: BadRequestResponse
      description: Invalid json error response.
    UnauthorizedResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/UnauthorizedError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: UnauthorizedResponse
      description: Payment unauthorized response.
    ForbiddenResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ForbiddenError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: ForbiddenResponse
      description: Payment forbidden response.
    NotFoundResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/NotFoundError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: NotFoundResponse
      description: Not found response.
    ConflictResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ConflictError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: ConflictResponse
      description: Conflict response.
    TooManyRequestsResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/TooManyRequestsError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: TooManyRequestsResponse
      description: Rate limited response.
    InternalErrorResponse:
      properties:
        errors:
          items:
            anyOf:
              - $ref: '#/components/schemas/InternalError'
              - $ref: '#/components/schemas/PartnerError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: InternalErrorResponse
      description: Internal error response.
    FeatureNotImplementedResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/FeatureNotImplementedError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: FeatureNotImplementedResponse
      description: Not implemented response.
    ServiceUnvavailableResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ServiceUnavailableError'
          type: array
          title: Errors
          description: List of errors
      type: object
      required:
        - errors
      title: ServiceUnvavailableResponse
      description: Service unavailable response.
    ConsumerOfferChargeBillType:
      type: string
      enum:
        - FIRST_BILL
        - RENEWAL
        - PRO_RATED_CHARGE
      title: ConsumerOfferChargeBillType
      description: Types of bills.
    ConsumerWithBillingIdentifier:
      properties:
        consumerIdentifier:
          type: string
          maxLength: 400
          title: Consumer Identifier
          description: Consumer identifier
        billingIdentifier:
          type: string
          title: Billing Identifier
          description: Billing identifier
      type: object
      required:
        - consumerIdentifier
      title: ConsumerWithBillingIdentifier
      description: Consumer with billing identifier.
    ConsumerWithPhoneNumber:
      properties:
        consumerIdentifier:
          type: string
          maxLength: 400
          title: Consumer Identifier
          description: Consumer identifier
        phoneNumber:
          type: string
          title: Phone Number
          description: Phone number
      type: object
      required:
        - consumerIdentifier
      title: ConsumerWithPhoneNumber
      description: Consumer with phone number.
    ConsumerOfferSummary:
      properties:
        consumerOfferId:
          type: string
          title: Consumer Offer ID
          description: A globally unique and immutable identifier of the Consumer Offer
          examples:
            - 338d31e1-a289-40dd-beff-ab41c1fc5f51
        offerId:
          type: string
          title: Offer ID
          description: >-
            A globally unique and immutable identifier of the offer the consumer
            has subcribed to.
          examples:
            - 7560fca0-d8a9-4124-a172-924debec874e
        entitlements:
          items:
            $ref: '#/components/schemas/Entitlement'
          type: array
          title: Entitlement list
          description: Entitlements created under this consumer offer.
      type: object
      required:
        - consumerOfferId
        - offerId
      title: ConsumerOfferSummary
      description: Consumer Offer.
    ConsumerOfferBillingDetail:
      properties:
        planType:
          $ref: '#/components/schemas/PlanType'
          title: Plan Type
          description: |-
            Plan type:

            * `SUBSCRIPTION`: Recurring subscription plan
            * `FIXED_TERM`: Fixed-term plan
            * `TRANSACTION`: One-time transaction
            * `REDEMPTION`: Redemption-based plan
          examples:
            - SUBSCRIPTION
        billingPeriod:
          $ref: '#/components/schemas/BillingPeriod'
          title: Billing Period
          description: Billing period information
      type: object
      required:
        - planType
        - billingPeriod
      title: ConsumerOfferBillingDetail
      description: Billing information.
    LineItemForOffer:
      properties:
        lineItemType:
          type: string
          const: OFFER
          title: Line Item Type
          description: Base price of an offer
        quantity:
          type: integer
          title: Quantity
          description: Number of units charged.
          examples:
            - 1
        amount:
          type: integer
          title: Amount
          description: Charge amount, in minor units
          examples:
            - 1699
        currency:
          type: string
          title: Currency
          description: Currency code (ISO 4217)
          examples:
            - USD
        consumerOfferId:
          type: string
          title: Consumer Offer ID
          description: A globally unique and immutable identifier of the Consumer Offer
      type: object
      required:
        - lineItemType
        - quantity
        - amount
        - currency
        - consumerOfferId
      title: LineItemForOffer
      description: Line item details - offer base price.
    LineItemForTierChangeProration:
      properties:
        lineItemType:
          type: string
          const: OFFER_TIER_CHANGE_PRORATION
          title: Line Item Type
          description: >-
            Pro-ration caused by a tier change in one of the entitlements in the
            consumer offer
        quantity:
          type: integer
          title: Quantity
          description: Number of units charged.
          examples:
            - 1
        amount:
          type: integer
          title: Amount
          description: Charge amount, in minor units
          examples:
            - 1699
        currency:
          type: string
          title: Currency
          description: Currency code (ISO 4217)
          examples:
            - USD
        entitlementId:
          type: string
          title: Entitlement ID
          description: A globally unique and immutable identifier of the entitlement.
      type: object
      required:
        - lineItemType
        - quantity
        - amount
        - currency
        - entitlementId
      title: LineItemForTierChangeProration
      description: Line item details - pro-ration caused by an entitlement tier change.
    LineItemForEntitlementTierDelta:
      properties:
        lineItemType:
          type: string
          const: OFFER_ENTITLEMENT_TIER_DELTA
          title: Line Item Type
          description: >-
            Price delta caused by a tier change in one of the entitlements in
            the consumer offer
        quantity:
          type: integer
          title: Quantity
          description: Number of units charged.
          examples:
            - 1
        amount:
          type: integer
          title: Amount
          description: Charge amount, in minor units
          examples:
            - 1699
        currency:
          type: string
          title: Currency
          description: Currency code (ISO 4217)
          examples:
            - USD
        entitlementId:
          type: string
          title: Entitlement ID
          description: A globally unique and immutable identifier of the entitlement.
      type: object
      required:
        - lineItemType
        - quantity
        - amount
        - currency
        - entitlementId
      title: LineItemForEntitlementTierDelta
      description: Line item details - delta price caused by an entitlement tier change.
    ChargeDeclineReason:
      type: string
      enum:
        - DENIED
        - USER_INVALID
        - USER_BARRED
        - USER_SUSPENDED
        - USER_NOT_ENABLED
        - USER_INSUFFICIENT_CREDIT
        - USER_SPEND_LIMIT_EXCEEDED
        - ALREADY_IN_PROGRESS
      title: ChargeDeclineReason
      description: Decline reason.
    InvalidJsonError:
      properties:
        code:
          type: string
          const: invalid-json
          title: Code
          description: The request body is not valid JSON
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: InvalidJsonError
      description: Invalid json error.
    MissingParameterError:
      properties:
        code:
          type: string
          const: missing-parameter
          title: Code
          description: A required parameter is missing from the request
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: MissingParameterError
      description: Invalid json error.
    InvalidParameterError:
      properties:
        code:
          type: string
          const: invalid-parameter
          title: Code
          description: A request parameter is invalid
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: InvalidParameterError
      description: Invalid json error.
    UnauthorizedError:
      properties:
        code:
          type: string
          const: invalid-credentials
          title: Code
          description: Invalid credentials
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: UnauthorizedError
      description: Not authorized error.
    ForbiddenError:
      properties:
        code:
          type: string
          const: permission-denied
          title: Code
          description: Permission denied
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: ForbiddenError
      description: Forbidden error.
    NotFoundError:
      properties:
        code:
          type: string
          const: not-found
          title: Code
          description: The target consumer or consumer no longer exists
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: NotFoundError
      description: Not found error.
    ConflictError:
      properties:
        code:
          type: string
          const: conflict
          title: Code
          description: The request conflicts with the current status of the target entity
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: ConflictError
      description: Conflict error.
    TooManyRequestsError:
      properties:
        code:
          type: string
          const: too-many-requests
          title: Code
          description: Too many requests
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: TooManyRequestsError
      description: Rate limited error.
    InternalError:
      properties:
        code:
          type: string
          const: internal-server-error
          title: Code
          description: Internal Server Error
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: InternalError
      description: Internal error.
    PartnerError:
      properties:
        code:
          type: string
          const: partner-failure
          title: Code
          description: Partner failure
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: PartnerError
      description: Partner failure.
    FeatureNotImplementedError:
      properties:
        code:
          type: string
          const: not-implemented
          title: Code
          description: Not Implemented
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: FeatureNotImplementedError
      description: Not implemented error.
    ServiceUnavailableError:
      properties:
        code:
          type: string
          const: service-unavailable
          title: Code
          description: Service Unavailable
        message:
          type: string
          title: Message
          description: Human-readable message describing the error
        originator:
          type: string
          title: Originator
          description: Additional information to help identify the error origin.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Additional information to help identify the specific error case.
      type: object
      required:
        - code
        - message
      title: ServiceUnavailableError
      description: Internal error.
    Entitlement:
      properties:
        entitlementId:
          type: string
          title: Entitlement ID
          description: A globally unique and immutable identifier of the entitlement.
        contentProviderId:
          type: string
          title: Content Provider ID
          description: >-
            A globally unique, immutable, human readable identifier of the
            content provider that delivers the product.
        productId:
          type: string
          format: uuid
          title: Product ID
          description: >-
            A globally unique, immutable, identifier of the product the user is
            entitled to.
        productTierKey:
          type: string
          title: Product Tier ID
          description: >-
            A unique, immutable identifier of the product tier the user is
            entitled to.
      type: object
      required:
        - entitlementId
        - contentProviderId
        - productId
        - productTierKey
      title: Entitlement
      description: Entitlement to a specific product within a Consumer Offer.
    PlanType:
      type: string
      enum:
        - SUBSCRIPTION
        - FIXED_TERM
        - TRANSACTION
        - REDEMPTION
      title: PlanType
      description: Types of billing plans.
    BillingPeriod:
      properties:
        phaseType:
          $ref: '#/components/schemas/PhaseType'
          title: Phase Type
          description: |-
            Phase type:

            * `FREE`: Free trial or promotional period
            * `DISCOUNT`: Discounted pricing period
            * `FULL_PRICE`: Full price period
          examples:
            - FULL_PRICE
        duration:
          type: string
          title: Duration
          description: Duration in ISO 8601 format
          examples:
            - P1M
        renewalFrequency:
          type: string
          title: Renewal Frequency
          description: >-
            The frequency at which the consumer is billed during this phase e.g.
            P1M (monthly), P1Y (yearly).

            If the consumer is not billed during this phase, set this value to
            be the same as the phase's duration.
        startDate:
          type: string
          title: Start Date
          description: Start date
          examples:
            - '2026-01-01T01:00:00.000Z'
        endDate:
          type: string
          title: End Date
          description: End date
          examples:
            - '2026-02-01T00:59:59.999Z'
      type: object
      required:
        - phaseType
        - duration
        - renewalFrequency
        - startDate
        - endDate
      title: BillingPeriod
      description: Billing period details.
    PhaseType:
      type: string
      enum:
        - FREE
        - DISCOUNT
        - FULL_PRICE
      title: PhaseType
      description: Types of billing phases.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
    HTTPBasic:
      type: http
      scheme: basic
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /token

````