POST
Create a routing rule

Authorizations

X-Reevit-Key
string
header
required

API key for server-to-server authentication

Headers

X-Org-Id
string
required

Organization identifier for multi-tenancy

Idempotency-Key
string

Idempotency key for safe retries

Body

application/json
name
string
required

Human-readable name for the rule

countries
string[]
required

ISO 3166-1 alpha-2 country codes (e.g., US, GB, GH)

Minimum array length: 1
connection_id
string
required

The connection to use when this rule matches

methods
string[]

Payment methods (e.g., card, mobile_money). Empty means all methods.

priority
integer
default:0

Higher priority rules are evaluated first

fallback_to_default
boolean
default:true

If true, fall back to default routing if the connection is unavailable

enabled
boolean
default:true

Response

Created

A routing rule that explicitly routes payments from specific countries/methods to a specific connection. Rules are evaluated by priority (highest first). If no rule matches, default routing logic is used.

id
string
name
string

Human-readable name for the rule

countries
string[]

ISO 3166-1 alpha-2 country codes (e.g., US, GB, GH)

methods
string[]

Payment methods (e.g., card, mobile_money). Empty means all methods.

connection_id
string

The connection to use when this rule matches

priority
integer

Higher priority rules are evaluated first

fallback_to_default
boolean

If true, fall back to default routing if the connection is unavailable

enabled
boolean
created_at
string<date-time>
updated_at
string<date-time>