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

# Get a payment

> Returns the current state of a payment. No authentication is required, and the response deliberately excludes merchant data such as your app id and client reference id. Use it to show the buyer where their payment is. Use webhooks, not this call, to release goods.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/payments/{paymentId}
openapi: 3.1.0
info:
  title: Paywit API
  version: '1.0'
  description: >-
    Create payments, send buyers to the hosted checkout, and receive a signed
    webhook when they pay.
servers:
  - url: https://api.sandbox.paywit.xyz
    description: Sandbox (Stellar testnet, no real money)
security:
  - SecretKey: []
  - PublishableKey: []
paths:
  /v1/payments/{paymentId}:
    get:
      tags:
        - Payments
      summary: Get a payment
      description: >-
        Returns the current state of a payment. No authentication is required,
        and the response deliberately excludes merchant data such as your app id
        and client reference id. Use it to show the buyer where their payment
        is. Use webhooks, not this call, to release goods.
      operationId: getPayment
      parameters:
        - name: paymentId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The payment id returned when the payment was created.
      responses:
        '200':
          description: The payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentResponse'
              example:
                payment:
                  id: 0f4c1e2a-7b3d-4e5f-9a6b-1c2d3e4f5a6b
                  createdAt: '2026-10-14T09:29:07.335Z'
                  amount: 5.43
                  status: Paid
                  description: 'Order #18421'
                  returnUrl: https://shop.example/orders/18421
                  expiresAt: '2026-10-14T10:29:07.335Z'
                  bridgeStatus: null
        '404':
          description: No payment with that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security: []
components:
  schemas:
    GetPaymentResponse:
      type: object
      properties:
        payment:
          $ref: '#/components/schemas/Payment'
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
        body:
          description: A message or a validation-problem object describing what went wrong.
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        amount:
          type: number
          description: Amount in USDC.
        status:
          type: string
          enum:
            - Created
            - Pending
            - Bridging
            - Paid
            - Expired
            - Failed
            - DestinationMismatch
            - AssetMismatch
            - AmountMismatch
          description: >-
            Treat as an open set and ignore values you do not recognise. See the
            payment statuses guide.
        description:
          type:
            - string
            - 'null'
        returnUrl:
          type:
            - string
            - 'null'
        expiresAt:
          type: string
          format: date-time
          description: >-
            After this time the payment moves to Expired. Bridging payments
            never expire.
        bridgeStatus:
          type:
            - string
            - 'null'
          description: >-
            Cross-chain progress, for example `AwaitingPayment` or `Bridging`.
            Null for same-chain payments.
  securitySchemes:
    SecretKey:
      type: apiKey
      in: header
      name: X-Paywit-Secret-Key
      description: >-
        Server-to-server key, `sk_test_...` on sandbox and `sk_live_...` on
        production. Generate it in the dashboard under your app. Never ship it
        to a browser or mobile app.
    PublishableKey:
      type: apiKey
      in: header
      name: X-Paywit-Publishable-Key
      description: >-
        Client-side key, `pk_test_...` on sandbox and `pk_live_...` on
        production. Safe to embed in a web page. Can only create payments.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.