# PSP connections

Connect the PSP account you already take payments on, so refunds, disputes and agent labels flow between it and Enruta without code on your side.

Status: Live · Updated: 2026-09-14
For: seller
Source: https://enruta.ai/docs/psp-connections

A PSP connection lets Enruta work in your own PSP account, with credentials you create there. It writes the agent labels onto the payment, turns a refund or a cancellation made in the PSP into a reversal on the buyer’s side, lists disputes, and delivers dispute evidence. The money stays in your PSP account; Enruta never moves it.

## Supported PSPs

| PSP | `psp` | Status |
|---|---|---|
| Stripe | `stripe` | Live |
| Adyen | `adyen` | Code complete; needs your Adyen account |
| Checkout.com | `checkout_com` | Code complete; needs your Checkout.com account |
| Braintree | `braintree` | Code complete; needs your Braintree account |
| PayPal | `paypal` | Code complete; needs your PayPal business account |
| Worldpay | `worldpay` | Code complete; needs your Worldpay account |

Every adapter parses the PSP’s webhooks, issues refunds and submits dispute evidence, and writes the labels where the PSP allows it ([PSP metadata](https://enruta.ai/docs/psp-metadata) lists where and when). Disputes are read from the PSP’s API, except on Adyen, which has none: Enruta reads Adyen’s daily dispute report. Worldpay’s dispute calls go to its separate Disputes API, which needs a token Worldpay issues. Where the PSP reports the fee of a payment (Stripe, Checkout.com and PayPal), the [money split](https://enruta.ai/docs/economics) shows it as actual; for the others it stays an estimate.

> Every adapter is complete and tested against responses shaped by the PSP’s published API reference; Stripe is also tested in Stripe’s test mode. An adapter runs with your own account at that PSP, so a PSP other than Stripe starts working when you connect your account.

## Connect

```http
POST /v0/sellers/psp-connections          Authorization: Bearer enruta_slr_…
{
  "psp": "stripe",
  "mode": "live",
  "label": "Stripe, US",
  "credentials": { … }
}

GET    /v0/sellers/psp-connections
GET    /v0/sellers/psp-connections/{id}
POST   /v0/sellers/psp-connections/{id}/test       → checks the credentials against the PSP
GET    /v0/sellers/psp-connections/{id}/disputes   → the disputes at the PSP (POST reads them again)
DELETE /v0/sellers/psp-connections/{id}
```

- Create the credentials in your PSP, limited to what the adapter needs; the console lists the fields for each PSP.
- Credentials are encrypted at rest, never returned and never logged.
- `mode: test` uses the PSP’s test environment.
- Deleting a connection stops every write and every webhook for it at once.

## Webhooks from your PSP

Point your PSP’s webhook at `https://api.enruta.ai/v0/psp/{psp}/webhook/{connection_id}`. A refund or a cancellation of an agent order becomes a merchant-initiated reversal through the same path as a reported [adjustment](https://enruta.ai/docs/adjustments), counted once however often the PSP sends it; a dispute appears in your disputes list with the packet ready.

## Labels on the payment

When an agent order is reported with its PSP payment (`psp_payment` on `POST /v0/sellers/orders`), Enruta writes `agent_id`, `mandate_ref`, `policy_version`, `record_id`, `protocol` and `agent_platform` to the payment on Stripe, Braintree and PayPal (before capture), and the answer’s `psp_write_back` says what was written. Adyen, Checkout.com and Worldpay accept the fields only when the payment is created, so Enruta links the payment reference to the order instead: a [Storefront](https://enruta.ai/docs/storefront) sends the fields itself, and your own checkout can add them with `pspMetadata(psp, labels)`.

## Interfaces

| Surface | Call |
|---|---|
| REST | `GET` and `POST /v0/sellers/psp-connections`, `GET` and `DELETE /v0/sellers/psp-connections/{id}`, `POST /v0/sellers/psp-connections/{id}/test`, `GET` and `POST /v0/sellers/psp-connections/{id}/disputes`; `POST /v0/psp/{psp}/webhook/{connection_id}` |
| SDK | `sellers.pspConnections.*` |
| Console (seller) | `/psp`: connections, test, webhook URL |
