Actualizar un checkout o modificar sus items
Changed onActualiza campos del checkout y agrega, modifica o elimina filas individuales sin reenviar el carrito completo.
El checkout debe pertenecer a la cuenta del contexto. Una plataforma que envía X-ACCOUNT-ID puede actualizar cualquier checkout de esa hija conectada, sin filtrar por creador.
items es una lista de mutaciones sparse. Las filas que no aparecen permanecen sin cambios:
- Para agregar, envía price_id, quantity absoluta y metadata opcional. Solo se pueden agregar precios activos del catálogo de la cuenta; no se aceptan detalles inline en este endpoint.
- Para modificar, envía el id de item con prefijo it_ y una nueva quantity absoluta o metadata. La metadata reemplaza el objeto completo; {} la limpia.
- Para eliminar, envía el id de item y deleted: true sin otros campos.
Varias filas pueden compartir el mismo price_id: cada una conserva su propio id, cantidad y metadata. Una solicitud puede mezclar las tres operaciones y se aplica atómicamente; si cualquier mutación o validación del checkout falla, no se guarda ningún cambio. La respuesta exitosa siempre contiene el checkout completo y su colección items autoritativa.
Solo un checkout unpaid y sin un pago en proceso puede modificarse. Eliminar el último item deja el checkout abierto y vacío, pero no se puede pagar hasta agregar un item válido. Usa Idempotency-Key al agregar filas para que un retry de red devuelva la respuesta original sin duplicarlas.
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 del checkout
Headers
Clave de idempotencia para reintentos seguros de operaciones críticas, especialmente las que mueven dinero o cambian estado operativo. Reintentar con la misma clave y el mismo cuerpo devuelve la respuesta original (header Idempotency-Replayed: true); reusarla con parámetros distintos devuelve 409.
Request body
Response
Checkout actualizado con la colección completa y autoritativa de items
Changes
- breaking
added to the
response propertyoneOflist for the response status - breaking
added to the
response propertyoneOflist for the response status - breaking
added to the
response propertyoneOflist for the response status - breaking
the
/response's property type changed fromobjecttoarrayfor status - breaking
the
/response's property type changed fromobjecttoarrayfor 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