Conectar un PSP
post/v1/provider-connections
Conecta una cuenta de PSP. Las credenciales se cifran at-rest y nunca se devuelven. La respuesta incluye webhook_path: la URL que debés configurar en el PSP para la ingesta de webhooks.
Request
BASH
curl -X POST https://api.cauril.com/v1/provider-connections \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"provider": "stripe",
"credentials": {
"secret_key": "sk_test_...",
"webhook_secret": "whsec_..."
},
"mode": "test",
"label": "string"
}'Cuerpo ConnectProvider
| providerreq | string | |
| credentialsreq | object | Credenciales del PSP. Se cifran at-rest y nunca se devuelven. |
| mode | string | |
| label | string |
Respuestas
| 201 | Conexión creada | ProviderConnection |
| 409 | Error | Error |
Ejemplo de respuesta · 201
JSON
{
"object": "provider_connection",
"id": "pcon_01J...",
"provider": "string",
"mode": "test",
"status": "pending",
"label": null,
"capabilities": {
"methods": [
"string"
],
"currencies": [
"string"
]
},
"webhook_path": "string",
"created_at": "2026-06-01T12:00:00Z"
}