Docs · Sellers
PSP connections
LiveUpdated
Sellers. Written for merchants that receive agent orders.
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 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 shows it as actual; for the others it stays an estimate.
Connect
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: testuses 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, 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 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 |