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

# Get a payment intent

> Retrieve a single payment intent and its linked service request handoff URL.

Returns the payment intent id plus the linked `serviceRequestURL` in the app when the service request already exists.


## OpenAPI

````yaml GET /public/payment-intents/{paymentIntentId}
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /public/payment-intents/{paymentIntentId}:
    get:
      summary: Get one payment intent
      description: >-
        Retrieve a single payment intent and its linked service request handoff
        URL.
      operationId: getAffiliatePaymentIntent
      parameters:
        - name: paymentIntentId
          in: path
          required: true
          schema:
            type: string
          description: Payment intent identifier returned by `POST /public/services`.
      responses:
        '200':
          description: Payment intent retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePaymentIntent'
        '401':
          description: Missing or invalid affiliate API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePublicError'
        '403':
          description: Payment intent is not accessible to the affiliate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePublicError'
        '404':
          description: Payment intent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePublicError'
      security:
        - xApiKeyAuth: []
      servers:
        - url: https://api.prod.commenda.io/api/v1
components:
  schemas:
    AffiliatePaymentIntent:
      type: object
      required:
        - paymentIntentId
        - serviceRequestURL
      properties:
        paymentIntentId:
          type: string
          example: pi_123
        serviceRequestURL:
          type: string
          nullable: true
          description: App URL for the linked service request, if one exists.
          example: https://app.commenda.io/service-request/sr_123
    AffiliatePublicError:
      type: object
      required:
        - statusCode
        - message
        - error
      properties:
        statusCode:
          type: integer
          example: 403
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Company does not belong to this affiliate firm
        error:
          type: string
          example: Forbidden
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    xApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````