Cerrar y cobrar una cuenta
Changed onCierra la cuenta: deja de aceptar items y se cobra el total.
Con channel: payment_link (el valor por defecto) la respuesta trae un checkout_url que el cliente puede pagar con cualquier método que tengas habilitado. Con channel: saved_card se cobra de inmediato la tarjeta guardada; si el banco pide autenticación, la cuenta queda en closing y el checkout_url es donde el cliente la completa.
Pagar ese checkout marca la cuenta como paid, sin importar el canal.
Usa un Idempotency-Key único por cierre. Si la respuesta es 422, la llave queda reservada — el cobro pudo haber llegado al procesador antes del error — así que un reintento con la misma llave responde 409. Usa una llave nueva para volver a intentar.
Request
- Base URLhttps://app.recurrente.com/api
- AuthAPI key in header X-SECRET-KEY
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID de la cuenta abierta
Request body
Response
Cuenta cerrada
Changes
- breaking
added to the
response propertyoneOflist for the response status - breaking
the
/response's property type changed fromobjecttoarrayfor status
- breaking
- warning
deleted the
headerrequest parameterX-SECRET-KEY - info
the endpoint scheme security
secretKeywas added to the API
- warning