MethodFi Merchants API

Merchant directory

OpenAPI Specification

methodfi-merchants-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Method Account Attributes Merchants API
  version: '2025-12-01'
  license:
    name: Proprietary
    url: https://methodfi.com
  description: "The Method API enables you to retrieve financial data, create payments, and manage\nentities and accounts programmatically. This specification covers the public API\nsurface for version `2025-12-01`.\n\n## Authentication\n\nMost API requests require a Bearer token in the `Authorization` header.\nUse your secret key (`sk_...`) for server-side requests and public key (`pk_...`)\nfor client-side Element requests. Public Message-Level Encryption key discovery\nendpoints are documented separately and do not require authentication.\n\n## Versioning\n\nThe API version is selected via the `Method-Version` header. This spec targets\nversion `2025-12-01`. The SDK sets this header automatically.\n\n## Response Envelope\n\nMost JSON responses are wrapped in a standard envelope:\n\n```json\n{\n  \"success\": true,\n  \"data\": { ... },\n  \"message\": null\n}\n```\n\nThe `/.well-known/jwks.json` endpoint is an exception and returns a bare JWK set.\n\n## Pagination\n\nList endpoints return pagination metadata in response headers:\n`Pagination-Page`, `Pagination-Page-Count`, `Pagination-Page-Limit`,\n`Pagination-Total-Count`, `Pagination-Page-Cursor-Prev`, `Pagination-Page-Cursor-Next`.\n\n## Expandable Fields\n\nCertain resource fields can be expanded from IDs to full objects using the\n`expand` query parameter. Maximum nesting depth is 4 levels.\n"
  contact:
    name: Method Financial
    url: https://methodfi.com
    email: team@methodfi.com
servers:
- url: https://production.methodfi.com
  description: Production
- url: https://sandbox.methodfi.com
  description: Sandbox
- url: https://dev.methodfi.com
  description: Development
security:
- SecretKey: []
tags:
- name: Merchants
  description: Merchant directory
paths:
  /merchants:
    get:
      operationId: listMerchants
      summary: List all merchants
      description: Returns a list of merchants from the Method merchant directory.
      tags:
      - Merchants
      security:
      - SecretKey: []
      parameters:
      - $ref: '#/components/parameters/method_version'
      - name: name
        in: query
        required: false
        description: Search merchants by name.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Filter merchants by account type.
        schema:
          $ref: '#/components/schemas/MerchantType'
      responses:
        '200':
          description: A list of merchants.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
  /merchants/{mchId}:
    get:
      operationId: retrieveMerchant
      summary: Retrieve a merchant
      description: Returns a single merchant by its identifier.
      tags:
      - Merchants
      security:
      - SecretKey: []
      parameters:
      - $ref: '#/components/parameters/method_version'
      - name: mchId
        in: path
        required: true
        description: Unique identifier for the merchant.
        schema:
          type: string
          pattern: ^mch_\w+$
      responses:
        '200':
          description: The requested merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    InternalError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: Too many requests - rate limit exceeded.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Forbidden - insufficient permissions for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Not found - the requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    BadRequest:
      description: Bad request - invalid parameters or request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    ErrorObject:
      type: object
      required:
      - type
      - code
      - message
      properties:
        type:
          type: string
          description: Error type category.
          enum:
          - invalid_request
          - api_error
          - resource_error
        code:
          type: integer
          description: Numeric error code. Common codes include 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 422 (unprocessable entity), 429 (rate limited), and 500 (internal error).
        sub_type:
          type:
          - string
          - 'null'
          description: More specific error classification.
        message:
          type: string
          description: Human-readable error description.
    MerchantProviderIds:
      type: object
      properties:
        plaid:
          type: array
          items:
            type: string
        mx:
          type: array
          items:
            type: string
        finicity:
          type: array
          items:
            type: string
        dpp:
          type: array
          items:
            type: string
        rpps:
          type: array
          items:
            type: string
    Merchant:
      type: object
      required:
      - id
      - parent_name
      - name
      - logo
      - type
      - provider_ids
      - is_temp
      - account_number_formats
      properties:
        id:
          type: string
          description: Unique identifier for the merchant.
          example: mch_aTJMbnCjw34yQ
        parent_name:
          type: string
          description: Name of the parent merchant group.
          example: Chase
        name:
          type: string
          description: Display name of the merchant.
          example: Chase - Credit Cards
        logo:
          type: string
          description: URL of the merchant logo.
          example: https://static.methodfi.com/logos/chase.png
        type:
          $ref: '#/components/schemas/MerchantType'
          description: Type of accounts supported by this merchant.
        provider_ids:
          $ref: '#/components/schemas/MerchantProviderIds'
        is_temp:
          type: boolean
          description: Whether this is a temporary merchant entry.
        account_number_formats:
          type: array
          items:
            type: string
          description: Accepted account number formats.
    MerchantListResponse:
      allOf:
      - $ref: '#/components/schemas/ListEnvelope'
      - type: object
        properties:
          data:
            type: array
            items:
              $ref: '#/components/schemas/Merchant'
    MerchantResponse:
      allOf:
      - $ref: '#/components/schemas/SuccessEnvelope'
      - type: object
        properties:
          data:
            $ref: '#/components/schemas/Merchant'
    ListEnvelope:
      type: object
      description: Standard envelope for successful responses that return a list payload.
      required:
      - success
      - data
      - message
      properties:
        success:
          type: boolean
          description: Always `true` for successful responses.
        data:
          description: Operation-specific list payload.
        message:
          type:
          - string
          - 'null'
      example:
        success: true
        data: []
        message: null
    ErrorEnvelope:
      type: object
      required:
      - success
      - data
      - message
      properties:
        success:
          type: boolean
          description: Always `false` for error responses.
        data:
          type: object
          required:
          - error
          properties:
            error:
              $ref: '#/components/schemas/ErrorObject'
        message:
          type: string
    MerchantType:
      type: string
      enum:
      - auto_loan
      - bank
      - bnpl
      - business_loan
      - city
      - collection
      - county
      - credit_builder
      - credit_card
      - electric_utility
      - fintech
      - home_equity_loan
      - home_loan
      - insurance
      - internet_utility
      - loan
      - medical
      - mortgage
      - personal_loan
      - student_loan
      - student_loans
      - subscription
      - telephone_utility
      - television_utility
      - unknown
      - utility
      - waste_utility
      - water_utility
    SuccessEnvelope:
      type: object
      description: Standard envelope for successful responses that return a single payload.
      required:
      - success
      - data
      - message
      properties:
        success:
          type: boolean
          description: Always `true` for successful responses.
        data:
          description: Operation-specific response payload.
        message:
          type:
          - string
          - 'null'
      example:
        success: true
        data: {}
        message: null
  parameters:
    method_version:
      name: Method-Version
      in: header
      required: true
      description: 'API version to use for this request. This spec targets `2025-12-01`.

        The SDK sets this header automatically.

        '
      schema:
        type: string
        enum:
        - '2025-12-01'
        default: '2025-12-01'
  securitySchemes:
    OpalToken:
      type: http
      scheme: bearer
      description: 'Opal token authentication for Opal session endpoints. Use an Opal token (`otkn_...`)

        as the Bearer token. Created via POST /opal/token using a secret key.

        '
    SecretKey:
      type: http
      scheme: bearer
      description: 'Secret key authentication. Use your team''s secret key (`sk_...`) as the Bearer token.

        All authenticated API endpoints require this scheme unless otherwise noted.

        '