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

# Update Payment Intent Amount

> Synchronise an existing Stripe payment intent's amount with the cart's current grand total. Call this after the cart changes (items, shipping, discounts) so the payment intent reflects the latest amount due.



## OpenAPI

````yaml /api-reference/openapi.json post /carts/{cartId}/updatePaymentIntent
openapi: 3.0.0
info:
  title: Marzipan API
  version: 1.0.0
servers:
  - url: https://api.marzipan.co/v1
security:
  - tenantAuth: []
tags:
  - name: Account
    description: >-
      Account management endpoints including registration, login, and user
      details
  - name: Carts
    description: Shopping cart management endpoints
  - name: Products
    description: Product catalog and search endpoints
  - name: Subscriptions
    description: Subscription management and renewal endpoints
  - name: CMS
    description: Content management system endpoints
  - name: Messaging
    description: Message and communication endpoints
  - name: Search
    description: Search functionality endpoints
  - name: Settings
    description: >-
      Storefront settings and market detection used to configure the web
      components and checkout.
  - name: Analytics
    description: Storefront visit and attribution tracking.
  - name: Rewards
    description: >-
      Loyalty and rewards programme endpoints for the authenticated customer,
      covering points balance, tier status, perks, exclusive products and
      transaction history.
  - name: Forms
    description: Render and submit dynamic storefront forms defined in the CMS.
  - name: Events
    description: >-
      Check event availability, browse occurrences and recurring dates, generate
      ticket QR codes, and manage event waitlists (join, leave, check status,
      and claim promoted spots).
paths:
  /carts/{cartId}/updatePaymentIntent:
    parameters:
      - name: cartId
        in: path
        required: true
        description: The unique identifier for the cart
        schema:
          type: string
          format: uuid
        example: 893ff86d-4453-4134-9f62-5c9b7a70d74e
    post:
      tags:
        - Carts
      summary: Update Payment Intent Amount
      description: >-
        Synchronise an existing Stripe payment intent's amount with the cart's
        current grand total. Call this after the cart changes (items, shipping,
        discounts) so the payment intent reflects the latest amount due.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: string
                  description: The Stripe payment intent identifier to update.
            example:
              id: pi_3QabcXY2eZvKYlo21n4kD8Fg
      responses:
        '200':
          description: Payment intent updated. Returns the Stripe payment intent status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The Stripe payment intent status after the update.
                    example: requires_payment_method
              example:
                status: requires_payment_method
        '404':
          description: Cart not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: No query results for model [Cart].
        '422':
          description: The payment intent id was not provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                message: The id field is required.
                errors:
                  id:
                    - The id field is required.
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
      required:
        - message
    ValidationError:
      type: object
      properties:
        message:
          type: string
          description: Validation error message
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field-specific validation errors
      required:
        - message
        - errors
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT

````