Hifi Settlement Rules API

The Settlement Rules API from Hifi — 5 operation(s) for settlement rules.

Operations 7

GET /v2/virtual-accounts/settlement-rules/{ruleId} Retrieve a settlement rule
DELETE /v2/virtual-accounts/settlement-rules/{ruleId} Delete a settlement rule
POST /v2/virtual-accounts/settlement-rules Create a settlement rule
GET /v2/virtual-accounts/settlement-rules List all settlement rules
POST /v2/virtual-accounts/settlement-rules/{ruleId}/update Update a settlement rule
POST /v2/users/{userId}/virtual-accounts/{accountId}/settlement-rules/{ruleId} Apply settlement rule to virtual account
DELETE /v2/users/{userId}/virtual-accounts/{accountId}/settlement-rules Remove settlement rule from virtual account

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hifi-settlement-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hifi-settlement-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hifi Account Settlement Rules API
  version: 2.0.0
  description: API documentation for Hifi
servers:
- url: https://production.hifibridge.com
  description: Production server
- url: https://sandbox.hifibridge.com
  description: Sandbox server
security:
- bearerAuth: []
tags:
- name: Settlement Rules
paths:
  /v2/virtual-accounts/settlement-rules/{ruleId}:
    get:
      summary: Retrieve a settlement rule
      description: Get an existing settlement rule detail.
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/RuleIdPathParameter'
      responses:
        '200':
          $ref: '#/components/responses/GetSettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
    delete:
      summary: Delete a settlement rule
      description: Delete an existing settlement rule.
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/RuleIdPathParameter'
      responses:
        '200':
          $ref: '#/components/responses/DeleteSettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
  /v2/virtual-accounts/settlement-rules:
    post:
      summary: Create a settlement rule
      description: 'Create a new settlement rule for virtual accounts. Settlement rules define how fees are calculated and distributed when processing an onramp transaction.

        '
      tags:
      - Settlement Rules
      requestBody:
        $ref: '#/components/requestBodies/CreateSettlementRuleBody'
      responses:
        '200':
          $ref: '#/components/responses/CreateSettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
    get:
      summary: List all settlement rules
      description: List all settlement rules available for virtual accounts.
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/SettlementRuleLimitParameter'
      - $ref: '#/components/parameters/SettlementRuleCreatedBeforeParameter'
      - $ref: '#/components/parameters/SettlementRuleCreatedAfterParameter'
      - $ref: '#/components/parameters/SettlementRuleChainParameter'
      responses:
        '200':
          $ref: '#/components/responses/GetAllSettlementRulesResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
  /v2/virtual-accounts/settlement-rules/{ruleId}/update:
    post:
      summary: Update a settlement rule
      description: 'Update an existing settlement rule. This will replace all existing rules with the new configuration.

        '
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/RuleIdPathParameter'
      requestBody:
        $ref: '#/components/requestBodies/UpdateSettlementRuleBody'
      responses:
        '200':
          $ref: '#/components/responses/UpdateSettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
  /v2/users/{userId}/virtual-accounts/{accountId}/settlement-rules/{ruleId}:
    post:
      summary: Apply settlement rule to virtual account
      description: 'Apply a settlement rule to a specific virtual account. This will enable the fee structure defined in the rule for transactions on that account.

        '
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/UserIdPathParameter'
      - $ref: '#/components/parameters/VirtualAccountIdPathParameter'
      - $ref: '#/components/parameters/RuleIdPathParameter'
      responses:
        '200':
          $ref: '#/components/responses/ApplySettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
  /v2/users/{userId}/virtual-accounts/{accountId}/settlement-rules:
    delete:
      summary: Remove settlement rule from virtual account
      description: 'Remove a settlement rule from a specific virtual account. This will disable the fee structure for that account.

        '
      tags:
      - Settlement Rules
      parameters:
      - $ref: '#/components/parameters/UserIdPathParameter'
      - $ref: '#/components/parameters/VirtualAccountIdPathParameter'
      responses:
        '200':
          $ref: '#/components/responses/RemoveSettlementRuleResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  schemas:
    UpdateSettlementRule:
      type: object
      title: Update Settlement Rule
      properties:
        requestId:
          type: string
          description: Unique identifier for the request (recommend using uuid v4)
          example: '{{$guid}}'
        chain:
          type: string
          enum:
          - BASE
          - POLYGON
          - ETHEREUM
          - SOLANA
          description: Blockchain network for the settlement rule
          example: BASE
        includeHIFIFee:
          type: boolean
          description: Whether to include HiFi's fee in addition to custom rules
          example: false
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SettlementRule'
          description: Array of settlement rules
          minItems: 1
      required:
      - requestId
      - chain
      - includeHIFIFee
      - rules
    CreateSettlementRule:
      type: object
      title: Create Settlement Rule
      properties:
        requestId:
          type: string
          description: Unique identifier for the request (recommend using uuid v4)
          example: '{{$guid}}'
        chain:
          type: string
          enum:
          - BASE
          - POLYGON
          - ETHEREUM
          - SOLANA
          description: Blockchain network for the settlement rule, this should be the same as the blockchain network of the virtual account
          example: BASE
        includeHIFIFee:
          type: boolean
          description: Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee
          example: false
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SettlementRule'
          description: Array of settlement rules
          minItems: 1
      required:
      - requestId
      - chain
      - includeHIFIFee
      - rules
    SettlementRule:
      type: object
      title: Settlement Rule
      properties:
        type:
          type: string
          enum:
          - PERCENTAGE
          - FIXED
          description: Type of fee calculation
          example: PERCENTAGE
        calculationModel:
          type: string
          enum:
          - FIXED
          - TIERED
          description: Model for calculating the fee
          example: FIXED
        value:
          type:
          - number
          - 'null'
          description: Fixed fee value (omit for tiered calculation model)
          example: 0.001
        tiers:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/SettlementRuleTier'
          description: Tiered fee structure (omit for fixed calculation model)
        walletAddress:
          type: string
          description: Wallet address to receive the fee
          example: '0x15FB50680fEB2f726413416665c25f9B397b047b'
      required:
      - type
      - calculationModel
      - walletAddress
    RemoveSettlementRuleResponse:
      type: object
      title: Remove Settlement Rule Response
      properties:
        message:
          type: string
          description: Success message
      required:
      - message
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Unexpected error happened
    SettlementRuleTier:
      type: object
      title: Settlement Rule Tier
      properties:
        min:
          type: string
          description: Minimum value for this tier (empty string is required for first tier)
          example: '1000'
        max:
          type: string
          description: Maximum value for this tier (empty string is required for last tier)
          example: '2000'
        value:
          type: number
          description: Fee value for this tier
          example: 0.0005
      required:
      - min
      - max
      - value
    DeleteSettlementRuleResponse:
      type: object
      title: Delete Settlement Rule Response
      properties:
        message:
          type: string
          description: Success message
      required:
      - message
    SettlementRuleResponse:
      type: object
      title: Settlement Rule Response
      properties:
        id:
          type: string
          description: Unique identifier for the settlement rule
          example: 15c786fb-de7a-520c-a4b3-f312d4a122d2
        chain:
          type: string
          enum:
          - BASE
          - POLYGON
          - ETHEREUM
          - SOLANA
          description: Blockchain network for the settlement rule
          example: BASE
        includeHIFIFee:
          type: boolean
          description: Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee
          example: false
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SettlementRule'
          description: Array of settlement rules
      required:
      - id
      - chain
      - includeHIFIFee
      - rules
    ApplySettlementRuleResponse:
      type: object
      title: Apply Settlement Rule Response
      properties:
        message:
          type: string
          description: Success message
      required:
      - message
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: Not authorized
    SettlementRuleListResponse:
      type: object
      title: Settlement Rule List Response
      properties:
        count:
          type: integer
          description: Total number of settlement rules
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SettlementRuleResponse'
          description: Array of settlement rules
        nextCursor:
          type:
          - string
          - 'null'
          description: Cursor for pagination to the next page of results
      required:
      - count
      - rules
  parameters:
    SettlementRuleLimitParameter:
      name: limit
      in: query
      schema:
        type: string
        minimum: 1
        maximum: 100
      description: Number of settlement rules to return, default to 10 maximum to 100
      required: false
    UserIdPathParameter:
      name: userId
      in: path
      schema:
        type: string
      description: ID of the user
      required: true
    SettlementRuleCreatedBeforeParameter:
      name: createdBefore
      in: query
      schema:
        type: string
      description: Return the settlement rules that created before this date
      required: false
    RuleIdPathParameter:
      name: ruleId
      in: path
      schema:
        type: string
      description: ID of the settlement rule
      required: true
    SettlementRuleCreatedAfterParameter:
      name: createdAfter
      in: query
      schema:
        type: string
      description: Return the settlement rules that created after this date
      required: false
    VirtualAccountIdPathParameter:
      name: accountId
      in: path
      schema:
        type: string
      description: ID of the virtual account
      required: true
    SettlementRuleChainParameter:
      name: chain
      in: query
      schema:
        type: string
        enum:
        - BASE
        - POLYGON
        - ETHEREUM
        - SOLANA
      description: Return the settlement rules that are created on this chain
      required: false
  responses:
    RemoveSettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RemoveSettlementRuleResponse'
    ApplySettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApplySettlementRuleResponse'
    GetAllSettlementRulesResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementRuleListResponse'
    CreateSettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementRuleResponse'
          examples:
            SettlementRuleObjectExample:
              $ref: '#/components/examples/SettlementRuleObjectExample'
    GetSettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementRuleResponse'
          examples:
            SettlementRuleObjectExample:
              $ref: '#/components/examples/SettlementRuleObjectExample'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                - error
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    DeleteSettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteSettlementRuleResponse'
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
    UpdateSettlementRuleResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementRuleResponse'
          examples:
            SettlementRuleObjectExample:
              $ref: '#/components/examples/SettlementRuleObjectExample'
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
  examples:
    SettlementRuleObjectExample:
      summary: Settlement Rule Object
      value:
        id: 15c786fb-de7a-520c-a4b3-f312d4a122d2
        chain: BASE
        includeHIFIFee: false
        rules:
        - type: PERCENTAGE
          calculationModel: FIXED
          value: 0.001
          tiers: null
          walletAddress: '0x15FB50680fEB2f726413416665c25f9B397b047b'
        - type: FIXED
          calculationModel: FIXED
          value: 0.5
          tiers: null
          walletAddress: '0x15FB50680fEB2f726413416665c25f9B397b047b'
        - type: PERCENTAGE
          calculationModel: TIERED
          value: null
          tiers:
          - max: '1000'
            min: ''
            value: 0.0007
          - max: '2000'
            min: '1000'
            value: 0.0005
          - max: ''
            min: '2000'
            value: 0.0002
          walletAddress: '0x15FB50680fEB2f726413416665c25f9B397b047b'
  requestBodies:
    UpdateSettlementRuleBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSettlementRule'
    CreateSettlementRuleBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSettlementRule'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT