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

# Activate Usage Based Billing



## OpenAPI

````yaml /api-reference/ubb_openapi_inline.json post /activate
openapi: 3.0.1
info:
  title: Usage Based Billing API
  version: 1.0.0
  description: An Orchestrator for Usage Based Billing and Payments
servers:
  - url: https://api-m.sandbox.paypal.com/v1/commerce/billing
security:
  - BearerAuth:
      - read
      - write
tags:
  - name: Alerts
    description: API endpoints for managing subscription alerts
  - name: Events
    description: API endpoints for managing events
  - name: Metrics
    description: API endpoints for metrics and usage data
  - name: Merchant Activation
    description: API endpoint for merchant activation
  - name: Credit Notes
    description: API endpoints for credit notes management
  - name: Customers
    description: API endpoints for customer management
  - name: Invoices
    description: API endpoints for invoice management
  - name: Plans
    description: API endpoints for subscription plans
  - name: Subscriptions
    description: API endpoints for subscriptions
  - name: Wallets
    description: API endpoints for wallet management
  - name: Taxes
    description: API endpoints for tax management
  - name: Billing Entities
    description: API endpoints for billing entities
  - name: Features
    description: API endpoints for managing features and privileges
  - name: Entitlements
    description: API endpoints for managing plan and subscription entitlements
paths:
  /activate:
    post:
      tags:
        - Merchant Activation
      summary: Activate Usage Based Billing
      operationId: ActivateMerchant
      responses:
        '200':
          description: Merchant account activated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivateMerchantResponse'
              example:
                billing_tier_id: >-
                  NDc3Nzc1NTg0NTY0MTgyMzUzNw==.K7iva2SX08+9R52rAIfUwQvruZackQErIDDdEnUxxKE=
        '403':
          description: Authorization failed due to insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalidAccessToken:
                  summary: Insufficient permissions
                  value:
                    name: NOT_AUTHORIZED
                    message: Authorization failed due to insufficient permissions.
                    debug_id: 565f78f101498
                    details:
                      - issue: PERMISSION_DENIED
                        description: >-
                          You do not have permission to access or perform
                          operations on this resource.
                accountNotActivated:
                  summary: Account not activated
                  value:
                    name: NOT_AUTHORIZED
                    message: Authorization failed due to insufficient permissions.
                    debug_id: 565f78f101498
                    details:
                      - issue: ACCOUNT_NOT_ACTIVATED
                        description: The account is not activated for Usage-based Billing.
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ActivateMerchantResponse:
      type: object
      properties:
        billing_tier_id:
          type: string
          example: >-
            NDc3Nzc1NTg0NTY0MTgyMzUzNw==.K7iva2SX08+9R52rAIfUwQvruZackQErIDDdEnUxxKE=
          description: The unique code for merchant to use when sending events.
      description: >-
        Response object for activating a merchant account for usage based
        billing.
    Error:
      type: object
      properties:
        name:
          type: string
        debug_id:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
        location:
          type: string
        issue:
          type: string
        description:
          type: string
  responses:
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INTERNAL_SERVER_ERROR
            message: An internal server error has occurred.
            debug_id: 90957fca61718
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        Use the /v1/oauth2/token endpoint to obtain an access token and pass it
        as a Bearer token in the Authorization header.
      flows:
        clientCredentials:
          tokenUrl: https://api-m.sandbox.paypal.com/v1/oauth2/token
          scopes:
            read: Read access
            write: Write access

````