Disconnect a provider from a tenant
Disconnects one provider from the tenant of the credentials you authenticate with: records the disconnected state of the (tenant, provider) pair, deactivates the tenant’s credential of that provider when there is one, and then revokes the tenant’s inbound webhook connections for it in the control plane. A provider with no credential in the tenant is disconnected the same way.
GUARD. Under the exclusive locks of the tenant’s route for the four operations, of the (tenant, provider) pair and of the provider’s live credential, the disconnect is refused with 409 PBP-0703, and nothing changes, while some operation of the route points to the provider (routedOperations), or the provider has boletos PENDING or CREATED, batches with a submission not finalized, payments in a live status, or inbound notices accepted and not yet processed (openOperations). Every refusal is recorded with the actor, the reason and the counts.
EFFECT. From the commit, new payments and boletos of the provider are refused with 503 PBP-0704 and its new inbound notices with 401 PBP-0500. If the revocation fails after the state was recorded, the answer is 503 PBP-0008: the provider stays disconnected, and calling again completes the revocation; until then a reconnect is refused with 409 PBP-0703 REVOCATION_PENDING. The provider stays disconnected until reconnectProvider: the credential sync does not recreate its credential.
IDEMPOTENT under Idempotency-Key. A pair already disconnected answers outcome: ALREADY_DISCONNECTED with the disconnectedAt of the disconnect in force and re-applies its revocation. A retry with the key of an earlier disconnect answers from that disconnect and only completes its own revocation.
WHO MAY CALL IT: admin:create. A provider not installed here, of which the tenant has neither a credential nor a disconnect record, is answered 404 PBP-0005.
Encabezados
Parámetros de ruta
Cuerpo
Why the provider is disconnected.
Respuesta
OK

