Actualizar una sesión de checkout
PUT
/ucp/checkout-sessions/{id}Actualizar una sesión de checkout. Una solicitud exitosa devuelve HTTP 200 con el cuerpo de respuesta documentado.
AutorizaciónBearer <token>
Token de acceso OAuth 2.0 emitido por Ecomiq Auth.
Ubicación: header
Parámetros de ruta
id*string
Identificador único del recurso.
Parámetros de cabecera
x-Store-Domain*string
Slug o dominio configurado que selecciona el contexto de tienda para UCP.
Longitud
1 <= length <= 253UCP-Agent*string
Perfil del agente en el formato profile="https://agent.example/.well-known/ucp".
Longitud
1 <= lengthIdempotency-Key?string
Clave de idempotencia opcional para reintentar solicitudes UCP de forma segura.
Longitud
1 <= length <= 300Cuerpo de la solicitud
application/json
Definiciones TypeScript
Usa esta definición en TypeScript.
Cuerpo de la respuesta
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://example.com/ucp/checkout-sessions/7204558912004325301" \ -H "Authorization: Bearer <token>" \ -H "x-Store-Domain: my-store" \ -H "UCP-Agent: profile="https://agent.example/.well-known/ucp"" \ -H "Idempotency-Key: checkout-2026-0001" \ -H "Content-Type: application/json" \ -d '{ "line_items": [ { "item": { "id": "7204558912004325301", "title": "Example title", "price": 1, "quantity_unit": { "unit": "example", "display_text": "example", "scale": 1, "increment": 1 }, "unit_price": { "amount": 1, "currency": "PEN", "measure": { "value": 1, "unit": "example", "display_text": "example", "scale": 1 }, "reference": { "value": 1, "unit": "example", "display_text": "example", "scale": 1 } }, "image_url": "https://example.com/resource" }, "quantity": 1, "id": "7204558912004325301", "totals": [ { "type": "example", "amount": 1, "display_text": "example", "lines": [ { "display_text": "example", "amount": 1 } ] } ], "parent_id": "7204558912004325301" } ], "buyer": { "first_name": "Example resource", "last_name": "Example resource", "email": "andrea@example.com", "phone_number": "+51987654321" }, "context": { "currency": "PEN", "address_country": "example", "address_region": "example", "postal_code": "example_code", "intent": "example", "language": "es", "eligibility": [ "example" ] }, "signals": { "dev.ucp.buyer_ip": "example", "dev.ucp.user_agent": "example" }, "attribution": {}, "payment": { "instruments": [ { "id": "7204558912004325301", "handler_id": "7204558912004325301", "type": "example", "selected": false, "billing_address": {}, "credential": {}, "display": {} } ] }, "fulfillment": { "methods": [ { "id": "7204558912004325301", "type": "example", "line_item_ids": [ "example" ], "destinations": [ { "id": "7204558912004325301", "type": "example", "name": "Example resource", "address": { "extended_address": "example", "street_address": "example", "address_locality": "example", "address_region": "example", "address_country": "example", "postal_code": "example_code", "first_name": "Example resource", "last_name": "Example resource" }, "extended_address": "example", "street_address": "example", "address_locality": "example", "address_region": "example" } ], "selected_destination_id": "7204558912004325301", "groups": [ { "id": "7204558912004325301", "line_item_ids": [ "example" ], "options": [ { "id": "7204558912004325301", "title": "Example title", "description": { "plain": "example", "html": "example", "markdown": "example" }, "carrier": "example", "earliest_fulfillment_time": "example", "latest_fulfillment_time": "example", "totals": [ { "type": "example", "amount": 1, "display_text": "example", "lines": [ { "display_text": "example", "amount": 1 } ] } ] } ], "selected_option_id": "7204558912004325301" } ] } ], "available_methods": [ { "type": "example", "line_item_ids": [ "example" ], "fulfillable_on": "example", "description": "Example description." } ] } }'{ "ucp": { "version": "example", "status": "example", "capabilities": { "key": [ { "version": "example" } ] }, "payment_handlers": { "key": [ { "id": "7204558912004325301", "version": "example", "spec": "example", "schema": "example", "available_instruments": [ { "type": "example", "constraints": {} } ], "config": {} } ] } }, "id": "7204558912004325301", "status": "example", "currency": "PEN", "cart_id": "7204558912004325301", "line_items": [ { "item": { "id": "7204558912004325301", "title": "Example title", "price": 1, "quantity_unit": { "unit": "example", "display_text": "example", "scale": 1, "increment": 1 }, "unit_price": { "amount": 1, "currency": "PEN", "measure": { "value": 1, "unit": "example", "display_text": "example", "scale": 1 }, "reference": { "value": 1, "unit": "example", "display_text": "example", "scale": 1 } }, "image_url": "https://example.com/resource" }, "quantity": 1, "id": "7204558912004325301", "totals": [ { "type": "example", "amount": 1, "display_text": "example", "lines": [ { "display_text": "example", "amount": 1 } ] } ], "parent_id": "7204558912004325301" } ], "buyer": { "first_name": "Example resource", "last_name": "Example resource", "email": "andrea@example.com", "phone_number": "+51987654321" }, "context": { "currency": "PEN", "address_country": "example", "address_region": "example", "postal_code": "example_code", "intent": "example", "language": "es", "eligibility": [ "example" ] }}