POST
/
v1
/
connections
Create or update a PSP connection (BYOK)
curl --request POST \
  --url http://localhost:8081/v1/connections \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <x-org-id>' \
  --header 'X-Reevit-Key: <api-key>' \
  --data '
{
  "provider": "paystack",
  "credentials": {},
  "id": "<string>",
  "mode": "live",
  "status": "active",
  "capabilities": {},
  "routing_hints": {
    "country_preference": [
      "<string>"
    ],
    "method_bias": {},
    "fallback_only": true
  },
  "labels": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "provider": "<string>",
  "mode": "<string>",
  "status": "<string>",
  "capabilities": {},
  "routing_hints": {
    "country_preference": [
      "<string>"
    ],
    "method_bias": {},
    "fallback_only": true
  },
  "labels": [
    "<string>"
  ],
  "fee_structure": {
    "percentage": 123,
    "fixed": 123,
    "per_method": {},
    "per_currency": {}
  },
  "total_calls": 123,
  "successful_calls": 123,
  "failed_calls": 123,
  "total_latency_ms": 123,
  "last_success_at": "2023-11-07T05:31:56Z",
  "last_failure_at": "2023-11-07T05:31:56Z",
  "health_score": 123,
  "health_status": "<string>",
  "last_validated_at": "2023-11-07T05:31:56Z",
  "last_validation_status": "<string>",
  "last_validation_error": "<string>",
  "validation_failures": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

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
provider
enum<string>
required
Available options:
paystack,
hubtel,
flutterwave,
monnify,
mpesa,
stripe
credentials
object
required
id
string
mode
enum<string>
default:live
Available options:
sandbox,
live
status
enum<string>
default:active
Available options:
active,
inactive
capabilities
object
routing_hints
object
labels
string[]

Up to 20 lowercase labels (letters, numbers, -, _)

Response

Created

id
string
provider
string
mode
string
status
string
capabilities
object
routing_hints
object
labels
string[]
fee_structure
object
total_calls
integer<int64>
successful_calls
integer<int64>
failed_calls
integer<int64>
total_latency_ms
integer<int64>
last_success_at
string<date-time>
last_failure_at
string<date-time>
health_score
number<float>
health_status
string
last_validated_at
string<date-time>
last_validation_status
string
last_validation_error
string
validation_failures
integer
created_at
string<date-time>
updated_at
string<date-time>