> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getsly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update checkout

> Swap items, shipping address, or payment method before completion.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/acp/checkouts/{id}
openapi: 3.1.0
info:
  title: Sly API
  description: >-
    The Agentic Economy Platform — stablecoin payments, agent wallets,
    multi-protocol commerce, and AI agent orchestration.
  version: 1.0.0
  contact:
    name: Sly
    url: https://getsly.ai
    email: support@getsly.ai
servers:
  - url: https://api.getsly.ai/v1
    description: Production
  - url: https://sandbox.getsly.ai/v1
    description: Sandbox
security:
  - bearerAuth: []
paths:
  /v1/acp/checkouts/{id}:
    patch:
      tags:
        - ACP
      summary: Update checkout
      description: Swap items, shipping address, or payment method before completion.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateACPCheckoutInput'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ACPCheckout'
                required:
                  - data
        '409':
          description: Invalid state for update
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        type: string
                      code:
                        type: string
                      details: {}
      security:
        - bearerAuth: []
components:
  schemas:
    CreateACPCheckoutInput:
      type: object
      properties:
        merchant_id:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/ACPItem'
          minItems: 1
        shipping_address:
          allOf:
            - $ref: '#/components/schemas/ACPAddress'
            - type: object
        payment_method:
          type: string
          enum:
            - card
            - bank
            - stablecoin
          default: card
        metadata:
          type: object
          additionalProperties: {}
      required:
        - merchant_id
        - items
    ACPCheckout:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        status:
          type: string
          enum:
            - created
            - pending_payment
            - paid
            - fulfilled
            - failed
            - expired
            - cancelled
        items:
          type: array
          items:
            $ref: '#/components/schemas/ACPItem'
        total:
          type: string
        currency:
          type: string
        shipping_address:
          $ref: '#/components/schemas/ACPAddress'
        payment_method:
          type: string
          enum:
            - card
            - bank
            - stablecoin
          default: card
        client_secret:
          type:
            - string
            - 'null'
        metadata:
          type: object
          additionalProperties: {}
          default: {}
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
        - id
        - merchant_id
        - status
        - items
        - total
        - currency
        - expires_at
        - created_at
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details: {}
        request_id:
          type: string
      required:
        - error
    ACPItem:
      type: object
      properties:
        sku:
          type: string
        quantity:
          type: integer
          exclusiveMinimum: 0
        unit_price:
          type: string
        currency:
          type: string
      required:
        - sku
        - quantity
        - unit_price
        - currency
    ACPAddress:
      type:
        - object
        - 'null'
      properties:
        line1:
          type: string
        line2:
          type: string
        city:
          type: string
        state:
          type: string
        postal_code:
          type: string
        country:
          type: string
          minLength: 2
          maxLength: 2
      required:
        - line1
        - city
        - postal_code
        - country
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (pk_test_* or pk_live_*), JWT session, agent token (agent_*),
        Ed25519 session (sess_*), or portal token (portal_*).

````