> ## 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.

# Check PayFast Payment Status

> Poll the payment status for a cart after the PayFast modal closes. Returns `pending` while awaiting confirmation, `complete` once payment has succeeded (in which case the cart has been converted to an order), or `failed` with a message if the payment did not go through.



## OpenAPI

````yaml /api-reference/openapi.json get /carts/{cartId}/payfast/status
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}/payfast/status:
    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
    get:
      tags:
        - Carts
      summary: Check PayFast Payment Status
      description: >-
        Poll the payment status for a cart after the PayFast modal closes.
        Returns `pending` while awaiting confirmation, `complete` once payment
        has succeeded (in which case the cart has been converted to an order),
        or `failed` with a message if the payment did not go through.
      parameters: []
      responses:
        '200':
          description: The current PayFast payment status for the cart.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - pending
                      - complete
                      - failed
                    description: The payment status.
                  order:
                    type: object
                    nullable: true
                    description: >-
                      The created order (present when the cart was converted to
                      an order on completion).
                  paymentId:
                    type: string
                    nullable: true
                    description: >-
                      The PayFast payment identifier (present on completion when
                      the cart still exists).
                  message:
                    type: string
                    description: The failure reason (present when status is `failed`).
                required:
                  - status
              example:
                status: pending
components:
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT

````