Create a Connection

Creates a connection in ACTIVE status from credentials and configuration you fill in based on the provider’s catalog. The response includes the connection_id you’ll use to reference this connection from routing rules.

Headers

X-Idempotency-Keystringrequired

UUID, 24-hour scope. Re-sending the same key + body returns the cached response; same key with a different body returns a 409.

Body

account_idstringrequired

UUID of the account under which this connection will be created.

merchant_connection_idstringrequired

Your label for this connection. Must be unique within the account. Free-form (e.g., "adyen-us-prod-001", "stripe-eu-test").

provider_idstringrequired

WHITELABEL provider identifier (e.g., "STRIPE", "ADYEN"). Must exist in the catalog.

flow_typeenumrequired

Must be "PAYIN".

payment_methodsstring[]required

Subset of the provider’s payment_method_type[] (from the catalog).

paramsobject[]required

One {param_id, value} pair per parameter you’re supplying. Flat array — even nested catalog params are submitted at the top level; WHITELABEL resolves the hierarchy from the catalog tree.

Required params (where the catalog has optional: false) must be present and non-empty. Activating a boolean parent ("value": true) makes its optional: false children required.

Hide item
param_idstringrequired

The exact param_id from the catalog. Casing matters.

valuestring | boolean | number | arrayrequired

Match the field_type from the catalog. Numerics are submitted as JSON numbers (or strings if the catalog says field_type: "string"). For field_type: "array", submit a JSON array.

costsobject[]required

Per-connection cost configuration. currency must be one supported by the provider.

Hide item
sort_numberinteger

Order of priority for the cost entry.

cost_namestring

Label for the cost entry.

currencystring

ISO 4217 currency code.

cost_valuesobject
Hide successful | unsuccessful
fixed_feenumber

Fixed fee amount.

percentagenumber

Percentage fee.

Response

connection_idstring

Unique identifier for the connection. Save this value to reference it from routing rules.

merchant_connection_idstring

Your internal label for this connection.

provider_idstring

The provider this connection belongs to (e.g., ADYEN).

statusstring

Current status (always ACTIVE on create).

flow_typestring

Always PAYIN.

payment_methodsstring[]

List of supported payment methods.

paramsobject[]

Echoed parameters. Sensitive values are masked as ***.

costsobject[]

Cost configuration for the connection.

created_atstring

ISO 8601 timestamp.

updated_atstring

ISO 8601 timestamp.

cURL
curl -X POST 'https://api.whitelabel.com/v1/connections' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -H 'X-Idempotency-Key: <UUID>' \
  -d '{
    "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "merchant_connection_id": "stripe-us-prod-001",
    "provider_id": "STRIPE",
    "flow_type": "PAYIN",
    "payment_methods": ["CARD", "GOOGLE_PAY", "APPLE_PAY"],
    "params": [
      { "param_id": "API_KEY",           "value": "sk_live_..." },
      { "param_id": "PUBLISHABLE_KEY",   "value": "pk_live_..." },
      { "param_id": "INTEGRATION_TYPE",  "value": "PAYMENT_INTENTS" },
      { "param_id": "3DS_ENABLED",       "value": true },
      { "param_id": "ORIGIN_URL",        "value": "https://checkout.acme.com" }
    ],
    "costs": [
      {
        "sort_number": 1,
        "cost_name": "Transaction Fee",
        "currency": "USD",
        "cost_values": {
          "successful":   { "fixed_fee": 0.30, "percentage": 2.9 },
          "unsuccessful": { "fixed_fee": 0.0,  "percentage": 0.0 }
        }
      }
    ]
  }'
201 Created — Stripe
{
  "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
  "merchant_connection_id": "stripe-us-prod-001",
  "provider_id": "STRIPE",
  "status": "ACTIVE",
  "flow_type": "PAYIN",
  "payment_methods": ["CARD", "GOOGLE_PAY", "APPLE_PAY"],
  "params": [
    { "param_id": "API_KEY",             "value": "***" },
    { "param_id": "PUBLISHABLE_KEY",     "value": "pk_live_..." },
    { "param_id": "INTEGRATION_TYPE",    "value": "PAYMENT_INTENTS" },
    { "param_id": "3DS_ENABLED",         "value": true },
    { "param_id": "ORIGIN_URL",          "value": "https://checkout.acme.com" }
  ],
  "costs": [
    {
      "sort_number": 1,
      "cost_name": "Transaction Fee",
      "currency": "USD",
      "cost_values": {
        "successful":   { "fixed_fee": 0.30, "percentage": 2.9 },
        "unsuccessful": { "fixed_fee": 0.0,  "percentage": 0.0 }
      }
    }
  ],
  "created_at": "2026-05-12T10:24:00Z",
  "updated_at": "2026-05-12T10:24:00Z"
}
201 Created — Adyen
{
  "connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f",
  "merchant_connection_id": "adyen-eu-prod-001",
  "provider_id": "ADYEN",
  "status": "ACTIVE",
  "flow_type": "PAYIN",
  "payment_methods": ["CARD", "GOOGLE_PAY", "IDEAL"],
  "params": [
    { "param_id": "MERCHANT_ACCOUNT",        "value": "ACME_LIVE" },
    { "param_id": "X_API_KEY",               "value": "***" },
    { "param_id": "HMAC_KEY",               "value": "***" },
    { "param_id": "URL_PREFIX",             "value": "acme-live" },
    { "param_id": "TRANSACTION_IDENTIFIER", "value": "MERCHANT_REFERENCE" },
    { "param_id": "MERCHANT_NAME",          "value": "ACME Inc." },
    { "param_id": "CAPTURE_DELAY_HOURS",    "value": "24" },
    { "param_id": "RECURRING_MODEL",        "value": "CardOnFile" },
    { "param_id": "3DS_ENABLED",            "value": true },
    { "param_id": "ORIGIN_URL",             "value": "https://checkout.acme.com" }
  ],
  "costs": [
    {
      "sort_number": 1,
      "cost_name": "Transaction Fee",
      "currency": "EUR",
      "cost_values": {
        "successful":   { "fixed_fee": 0.12, "percentage": 1.2 },
        "unsuccessful": { "fixed_fee": 0.0,  "percentage": 0.0 }
      }
    }
  ],
  "created_at": "2026-05-12T10:31:42Z",
  "updated_at": "2026-05-12T10:31:42Z"
}
400 — Missing Param
{
  "type": "validation_error",
  "code": "MISSING_REQUIRED_PARAM",
  "message": "Required param 'API_KEY' is missing for provider 'STRIPE'",
  "details": { "provider_id": "STRIPE", "param_id": "API_KEY" }
}
409 — Conflict
{
  "type": "conflict",
  "code": "CONNECTION_MERCHANT_ID_CONFLICT",
  "message": "A connection with merchant_connection_id 'stripe-us-prod-001' already exists in this account",
  "details": { "merchant_connection_id": "stripe-us-prod-001" }
}

Secret handling: any param marked secret: true in the catalog is returned as "value": "***". Your submitted secret is stored encrypted and never echoed back.

Errors

HTTPcode
400PROVIDER_NOT_FOUND
Unknown provider_id.
400MISSING_REQUIRED_PARAM
A required param is missing. details.param_id names which one.
400UNSUPPORTED_PAYMENT_METHOD
payment_methods contains a method the provider doesn’t support.
400UNSUPPORTED_CURRENCY
A costs[].currency isn’t in the provider’s supported list.
400INVALID_PROVIDER_CREDENTIALS
The credentials failed WHITELABEL’s pre-flight check against the provider. details.provider_message echoes the provider’s reason.
401NOT_AUTHENTICATED
Missing or invalid API key.
409CONNECTION_MERCHANT_ID_CONFLICT
merchant_connection_id already exists in this account.
POST/connections

Creates a connection in ACTIVE status.

Header Parameters

X-Idempotency-Keystringrequired

Body application/json

account_idstring<uuid>required
merchant_connection_idstringrequired
provider_idstringrequired
flow_typestringrequired
payment_methodsstring[]required
paramsobject[]required
Show params properties
param_idstring
valuestring

Response

Created

connection_idstring
merchant_connection_idstring
provider_idstring
statusstring
flow_typestring
payment_methodsstring[]
paramsobject[]
costsobject[]
created_atstring<date-time>
updated_atstring<date-time>

Bad Request

typestring
codestring
messagestring
detailsobject

Unauthorized

typestring
codestring
messagestring

Conflict

typestring
codestring
messagestring
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/connections" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: <X-Idempotency-Key>" \
  -H "PUBLIC-API-KEY: <PUBLIC-API-KEY>" \
  -H "PRIVATE-SECRET-KEY: <PRIVATE-SECRET-KEY>" \
  -d '{
  "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "merchant_connection_id": "adyen-us-prod-001",
  "provider_id": "ADYEN",
  "flow_type": "PAYIN",
  "payment_methods": [
    "CARD",
    "GOOGLE_PAY"
  ],
  "params": [
    {
      "param_id": "string",
      "value": "string"
    }
  ]
}'
Response
{
  "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
  "merchant_connection_id": "stripe-us-prod-001",
  "provider_id": "STRIPE",
  "status": "ACTIVE",
  "flow_type": "PAYIN",
  "payment_methods": [
    "CARD",
    "GOOGLE_PAY",
    "APPLE_PAY"
  ],
  "params": [
    {}
  ],
  "costs": [
    {}
  ],
  "created_at": "2026-05-12T10:24:00Z",
  "updated_at": "2026-05-12T10:24:00Z"
}