Update a Connection

Partially updates a connection you previously created. Only the fields present in the body are applied — anything you omit keeps its current value.

What you can’t change here: provider_id, flow_type, payment_methods and the INTEGRATION_TYPE param are immutable. To change any of them, create a new connection and repoint your routing rules at it.

Path Parameters

connection_idstringrequired

The id returned by Create a Connection. Must belong to the account your API key is scoped to.

Body

account_idstringrequired

UUID of the account the connection belongs to.

merchant_connection_idstring

New label for this connection. Max 255 characters, and must still be unique within the account. Omit it to keep the current label.

paramsobject[]

Params to change, as a flat array of {param_id, value} pairs — the same shape as Create a Connection.

Params are merged by param_id over the connection’s current params: a param_id you don’t send keeps its current value. You only need to send what you’re actually changing. Every param_id you do send is validated against the provider catalog.

Hide item
param_idstringrequired

The exact param_id from the catalog. Casing matters.

valuestring | boolean | number | arrayrequired

Match the field_type from the catalog.

costsobject[]

Cost configuration. Unlike params, costs is not merged — when present it replaces the connection’s entire cost table. Omit it to leave the existing costs untouched.

Hide item
sort_numberinteger

Order of priority for the cost entry.

cost_namestring

Label for the cost entry.

currencystring

ISO 4217 currency code. Must be one supported by the provider.

cost_valuesobject
Hide successful | unsuccessful
fixed_feenumber

Fixed fee amount.

percentagenumber

Percentage fee.

Response

Returns the refreshed connection, in the same shape as Retrieve a Connection.

connection_idstring

Unique identifier for the connection. Unchanged by an update.

merchant_connection_idstring

Your internal label for this connection.

provider_idstring

The provider this connection belongs to.

statusstring

Current status.

flow_typestring

Always PAYIN.

payment_methodsstring[]

List of supported payment methods.

paramsobject[]

The connection’s full param set after the merge — not just the ones you sent. Sensitive values are masked as ***.

costsobject[]

Cost configuration for the connection.

created_atstring

ISO 8601 timestamp.

updated_atstring

ISO 8601 timestamp. Bumped by a successful update.

cURL — rotate a secret
curl -X PATCH 'https://api.whitelabel.com/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "params": [
      { "param_id": "API_KEY", "value": "sk_live_new..." }
    ]
  }'
cURL — rename
curl -X PATCH 'https://api.whitelabel.com/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "merchant_connection_id": "stripe-us-prod-002"
  }'
200 OK
{
  "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
  "merchant_connection_id": "stripe-us-prod-002",
  "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-12T11:02:17Z"
}
400 — Unknown Param
{
  "type": "validation_error",
  "code": "UNKNOWN_PARAM",
  "message": "Param 'FOO' is not part of the catalog for provider 'STRIPE'",
  "details": { "provider_id": "STRIPE", "param_id": "FOO" }
}
409 — Conflict
{
  "type": "conflict",
  "code": "CONNECTION_MERCHANT_ID_CONFLICT",
  "message": "A connection with merchant_connection_id 'stripe-us-prod-002' already exists in this account",
  "details": { "merchant_connection_id": "stripe-us-prod-002" }
}

Secret handling: params marked secret: true in the catalog are always returned as "value": "***". Sending "***" back is not how you keep a secret — just omit the param_id entirely and its stored value is preserved.

Errors

HTTPcode
400UNKNOWN_PARAM
A param_id isn’t part of the provider’s catalog.
400INVALID_PARAM_VALUE
A value doesn’t match the catalog’s field_type or allowed options.
400UNSUPPORTED_CURRENCY
A costs[].currency isn’t in the provider’s supported list.
400VALIDATION_ERROR
connection_id isn’t a valid UUID, or merchant_connection_id exceeds 255 characters.
400MALFORMED_BODY
The body isn’t valid JSON.
401NOT_AUTHENTICATED
Missing or invalid API key.
404CONNECTION_NOT_FOUND
Unknown connection_id, or the id belongs to a different account.
409CONNECTION_MERCHANT_ID_CONFLICT
merchant_connection_id already exists in this account.
PATCH/connections/{connection_id}

Partially updates a connection. Only the fields present in the body are applied.

Path Parameters

connection_idstringrequired

Body application/json

account_idstring<uuid>required
merchant_connection_idstring
paramsobject[]
Show params properties
param_idstring
valuestring
costsobject[]
Show costs properties
sort_numberinteger
cost_namestring
currencystring
cost_valuesobject
Show cost_values properties
successfulobject
Show successful properties
fixed_feenumber
percentagenumber
unsuccessfulobject
Show unsuccessful properties
fixed_feenumber
percentagenumber

Response

OK

connection_idstring
merchant_connection_idstring
provider_idstring
statusstring
flow_typestring
payment_methodsstring[]
paramsobject[]
Show params properties
param_idstring
valuestring
costsobject[]
Show costs properties
sort_numberinteger
cost_namestring
currencystring
created_atstring<date-time>
updated_atstring<date-time>

Bad Request

typestring
codestring
messagestring

Unauthorized

typestring
codestring
messagestring

Not Found

typestring
codestring
messagestring

Conflict

typestring
codestring
messagestring
Request
curl -X PATCH "https://api-sandbox.whitelabel.com/v1/connections/<connection_id>" \
  -H "Content-Type: application/json" \
  -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": "stripe-us-prod-002",
  "params": [
    {
      "param_id": "API_KEY",
      "value": "sk_live_..."
    }
  ],
  "costs": [
    {
      "sort_number": 1,
      "cost_name": "Transaction Fee",
      "currency": "USD",
      "cost_values": {
        "successful": {
          "fixed_fee": 0.25,
          "percentage": 2.7
        },
        "unsuccessful": {
          "fixed_fee": 0,
          "percentage": 0
        }
      }
    }
  ]
}'
Response
{
  "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
  "merchant_connection_id": "stripe-us-prod-002",
  "provider_id": "STRIPE",
  "status": "ACTIVE",
  "flow_type": "PAYIN",
  "payment_methods": [
    "CARD",
    "GOOGLE_PAY",
    "APPLE_PAY"
  ],
  "params": [
    {
      "param_id": "API_KEY",
      "value": "***"
    }
  ],
  "costs": [
    {
      "sort_number": 1,
      "cost_name": "Transaction Fee",
      "currency": "USD"
    }
  ],
  "created_at": "2026-05-12T10:24:00Z",
  "updated_at": "2026-05-12T11:02:17Z"
}