openapi: 3.0.0
info:
  title: Meta
  description: The Meta API provides metadata information such as supported MCC codes and business types.
  contact: {}
  version: 1.0.0
servers:
  - url: https://payments.zoho.in/api/v1
    description: API Endpoint
tags:
  - name: meta
    description: Meta Module
paths:
  /meta:
    get:
      tags:
        - meta
      summary: Retrieve Meta Information
      description: Used to retrieve metadata information such as supported Merchant Category Codes (MCC) and business types.
      parameters:
        - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/meta-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoPay.payments.READ
components:
  parameters:
    account_id:
      name: account_id
      description: The Zoho Payments account ID.
      in: query
      required: true
      schema:
        type: number
        format: long
      example: 23137556
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/meta-data'
    meta-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          $ref: '#/components/schemas/meta-data'
    meta-data:
      type: object
      properties:
        business_name:
          description: The business name of the account.
          type: string
          example: Zylker PVT LTD
        mcc:
          description: The list of supported Merchant Category Codes (MCC). Each MCC object contains a <code>code</code>, <code>value</code>, and <code>formatted_value</code>.
          type: array
          items:
            $ref: '#/components/schemas/mcc-item'
        business_type:
          description: The list of supported business types. Each business type object contains a <code>code</code>, <code>value</code>, and <code>formatted_value</code>.
          type: array
          items:
            $ref: '#/components/schemas/business-type-item'
        presentment_currencies:
          description: The list of supported presentment currencies.
          type: array
          items:
            type: string
          example:
            - INR
    mcc-item:
      type: object
      properties:
        code:
          description: The numeric MCC code.
          type: string
          example: '7311'
        value:
          description: The MCC identifier value to be used in API requests.
          type: string
          example: advertising_services
        formatted_value:
          description: The human-readable name of the MCC.
          type: string
          example: Advertising Services
    business-type-item:
      type: object
      properties:
        code:
          description: The numeric code for the business type.
          type: integer
          example: 1
        value:
          description: The business type identifier value to be used in API requests.
          type: string
          example: individual
        formatted_value:
          description: The human-readable name of the business type.
          type: string
          example: Individual
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.in/oauth/v2/auth
          scopes:
            ZohoPay.payments.READ: Retrieve Meta Information
