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

# Routing - Rule Evaluate

> Evaluate routing rules



## OpenAPI

````yaml public/openapi.json post /routing/rule/evaluate
openapi: 3.0.3
info:
  title: PaymntCloud - API Documentation
  description: >

    ## Get started


    PaymntCloud provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access PaymntCloud API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.paymnt.cloud>   |

    | Production    | <https://api.paymnt.cloud>       |


    ## Authentication


    When you sign up on our [dashboard](https://dash.paymnt.cloud) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with PaymntCloud server by providing
    the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: PaymntCloud Support
    url: https://paymnt.cloud
    email: support@paymnt.cloud
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://api.paymnt.cloud
    description: Production Environment
  - url: https://sandbox.paymnt.cloud
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
  - name: Authentication
    description: Create and manage authentication
paths:
  /routing/rule/evaluate:
    post:
      tags:
        - Routing
      summary: Routing - Rule Evaluate
      description: Evaluate routing rules
      operationId: Evaluate routing rules (alternative)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoutingEvaluateRequest'
        required: true
      responses:
        '200':
          description: Routing rules evaluated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoutingEvaluateResponse'
        '400':
          description: Request body is malformed
        '403':
          description: Forbidden
        '404':
          description: Resource missing
        '422':
          description: Unprocessable request
        '500':
          description: Internal server error
      security:
        - api_key: []
components:
  schemas:
    RoutingEvaluateRequest:
      type: object
      required:
        - created_by
        - parameters
        - fallback_output
      properties:
        created_by:
          type: string
        parameters:
          type: object
          description: >-
            Parameters that can be used in the routing evaluate request.

            eg: {"parameters": {

            "payment_method": {"type": "enum_variant", "value": "card"},

            "payment_method_type": {"type": "enum_variant", "value": "credit"},

            "amount": {"type": "number", "value": 10},

            "currency": {"type": "str_value", "value": "INR"},

            "authentication_type": {"type": "enum_variant", "value":
            "three_ds"},

            "card_bin": {"type": "str_value", "value": "424242"},

            "capture_method": {"type": "enum_variant", "value": "scheduled"},

            "business_country": {"type": "str_value", "value": "IN"},

            "billing_country": {"type": "str_value", "value": "IN"},

            "business_label": {"type": "str_value", "value": "business_label"},

            "setup_future_usage": {"type": "enum_variant", "value":
            "off_session"},

            "card_network": {"type": "enum_variant", "value": "visa"},

            "payment_type": {"type": "enum_variant", "value":
            "recurring_mandate"},

            "mandate_type": {"type": "enum_variant", "value": "single_use"},

            "mandate_acceptance_type": {"type": "enum_variant", "value":
            "online"},

            "metadata":{"type": "metadata_variant", "value": {"key": "key1",
            "value": "value1"}}

            }}
        fallback_output:
          type: array
          items:
            $ref: '#/components/schemas/DeRoutableConnectorChoice'
    RoutingEvaluateResponse:
      type: object
      required:
        - status
        - output
        - evaluated_output
        - eligible_connectors
      properties:
        status:
          type: string
        output: {}
        evaluated_output:
          type: array
          items:
            $ref: '#/components/schemas/RoutableConnectorChoice'
        eligible_connectors:
          type: array
          items:
            $ref: '#/components/schemas/RoutableConnectorChoice'
    DeRoutableConnectorChoice:
      type: object
      description: Routable Connector chosen for a payment
      required:
        - gateway_name
        - gateway_id
      properties:
        gateway_name:
          $ref: '#/components/schemas/RoutableConnectors'
        gateway_id:
          type: string
    RoutableConnectorChoice:
      type: object
      description: Routable Connector chosen for a payment
      required:
        - connector
      properties:
        connector:
          $ref: '#/components/schemas/RoutableConnectors'
        merchant_connector_id:
          type: string
          nullable: true
    RoutableConnectors:
      type: string
      description: >-
        RoutableConnectors are the subset of Connectors that are eligible for
        payments routing
      enum:
        - authipay
        - adyenplatform
        - stripe_billing_test
        - phonypay
        - fauxpay
        - pretendpay
        - stripe_test
        - adyen_test
        - checkout_test
        - paypal_test
        - aci
        - adyen
        - affirm
        - airwallex
        - amazonpay
        - archipel
        - authorizedotnet
        - bankofamerica
        - barclaycard
        - billwerk
        - bitpay
        - bambora
        - blackhawknetwork
        - bamboraapac
        - bluesnap
        - bluecode
        - boku
        - braintree
        - breadpay
        - cashtocode
        - celero
        - chargebee
        - custombilling
        - checkbook
        - checkout
        - coinbase
        - coingate
        - cryptopay
        - cybersource
        - datatrans
        - deutschebank
        - digitalvirgo
        - dlocal
        - dwolla
        - ebanx
        - elavon
        - facilitapay
        - fiserv
        - fiservemea
        - fiuu
        - flexiti
        - forte
        - getnet
        - globalpay
        - globepay
        - gocardless
        - hipay
        - helcim
        - iatapay
        - inespay
        - itaubank
        - jpmorgan
        - klarna
        - mifinity
        - mollie
        - moneris
        - multisafepay
        - nexinets
        - nexixpay
        - nmi
        - nomupay
        - noon
        - nordea
        - novalnet
        - nuvei
        - opennode
        - paybox
        - payme
        - payload
        - payone
        - paypal
        - paysafe
        - paystack
        - paytm
        - payu
        - peachpayments
        - phonepe
        - placetopay
        - powertranz
        - prophetpay
        - rapyd
        - razorpay
        - recurly
        - redsys
        - riskified
        - santander
        - shift4
        - signifyd
        - silverflow
        - square
        - stax
        - stripe
        - stripebilling
        - trustpay
        - tokenio
        - tsys
        - volt
        - wellsfargo
        - wise
        - worldline
        - worldpay
        - worldpayvantiv
        - worldpayxml
        - xendit
        - zen
        - plaid
        - zsl
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Use the API key created under your merchant account from the PaymntCloud
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.

````