Skip to main content
PUT
Error

Autorizações

Authorization
string
header
obrigatório

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.

Cabeçalhos

X-Organization-Id
string

The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.

Parâmetros de caminho

id
string<uuid>
obrigatório

The environment's id.

provider
enum<string>
obrigatório

The payment gateway. stripe today. A gateway UserKit has no adapter for is refused here rather than stored, because a connection nothing can charge is discovered at somebody's checkout.

Opções disponíveis:
stripe

Corpo

application/json
secret_key
string
obrigatório

The gateway's server-side key.

publishable_key
string

The gateway's browser-side key, where it has one.

webhook_secret
string

What an inbound webhook's signature is verified against. Omit to leave the stored one alone.

Resposta

Connected. status is pending until the health check runs.

One payment gateway, as this environment holds it. Both secrets are absent by design: the secret key is write-only, and webhook_secret_set is the only thing said about the webhook secret.

connected and status answer different questions — a connection that exists and is unhealthy is not the same as no connection, and neither is a provider this server has no adapter for (adapter_available).

provider
string
Exemplo:

"stripe"

connected
boolean

Whether credentials have been stored for this provider in this environment. The fields below it are present only when true.

adapter_available
boolean

Whether this server can talk to the gateway at all. False means the health check answers 501 whatever else is reported here.

capabilities
object

What a gateway can do beyond the minimum every gateway can do. Every flag defaults to false, so a provider that declares nothing is treated as the weakest one — silence is never a claim. Read it to stop offering an act that would be refused.

Every flag below is always present. The object is emitted whole or not at all: absent means this server has no adapter loaded for the gateway, and it never means "some flags were left out". A reader must therefore distinguish false from missing rather than testing for falsiness — a key that is not here is not a gateway that cannot do something, it is a question nobody asked.

id
string<uuid>

The connection's id. It is what a webhook endpoint is addressed by.

status
enum<string>

Each value that is not connected names a different repair — see the endpoint description.

Opções disponíveis:
pending,
connected,
invalid_credentials,
mode_mismatch,
account_not_ready
status_detail
string

The gateway's own sentence, for a person to read. The status says which repair; this says why. Never parse it.

provider_account_id
string

The merchant account the credentials open, as the gateway names it. Empty until a health check has asked, and never erased by a later refusal — the catalogue's price mappings join by this value.

publishable_key
string

The gateway's browser-side key, where it has one. Public by design.

webhook_secret_set
boolean

Whether a webhook endpoint has been registered at the gateway.

last_verified_at
string<date-time> | null

Null means the gateway has never been asked. It moves even when the check could not be completed, which is what separates a fresh pending from a stale connected.

updated_at
string<date-time>