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

# Get session status

> Read the result of a partner payment session after the callback.

## GET `/payment-sessions/{token}`

Read the result of a partner payment session after the callback.

This endpoint is public. You do not need an API key or employee token.

Each session permits **two successful reads shared with the info endpoint**. A pending-status read also consumes one. Call this once after the callback; repeated polling can exhaust the result.

`cardType` is `coupon`, `loyalty`, `status`, or `points` when completed, and null while pending. `amount` is set only for coupon deductions; points and status operations return null. `completedAt` is null while pending.

The five-minute deadline prevents new session operations and info reads. Status reads do not directly check `expiresAt`: a stored session can remain readable until MongoDB's asynchronous TTL cleanup removes it, if reads remain. Missing or exhausted tokens return `410 PAYMENT_SESSION_UNAVAILABLE`, not `404`.

Treat `410` as an unavailable result. It can mean cleanup or exhausted reads and does not by itself prove tampering. Verify `status: completed` before confirming the operation. Rate limit: 60 requests per minute per IP.

### Example request

```bash theme={null}
curl "https://tapcoupon.at/api/v1/payment-sessions/YOUR_SESSION_TOKEN"
```

### Example response

```json theme={null}
{
  "status": "completed",
  "cardType": "coupon",
  "amount": 1500,
  "completedAt": "2026-10-02T12:03:00Z",
  "expiresAt": "2026-10-02T12:05:00Z"
}
```


## OpenAPI

````yaml api-reference/openapi.json GET /payment-sessions/{token}
openapi: 3.1.0
info:
  title: TapCoupon POS and partner API
  version: 1.0.0
  description: >-
    API-key POS operations, customer card views, and partner payment sessions.
    Verified against the tap_coupon backend on 2026-10-02. Dashboard /clients
    and administrative routes use separate authentication and are outside this
    reference.
servers:
  - url: https://tapcoupon.at/api/v1
security: []
paths:
  /payment-sessions/{token}:
    get:
      tags:
        - Integration
      summary: Get session status
      description: Read the result of a partner payment session after the callback.
      operationId: integration_get_status
      parameters:
        - name: token
          in: path
          required: true
          description: Secret session token.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionStatus'
              example:
                status: completed
                cardType: coupon
                amount: 1500
                completedAt: '2026-10-02T12:03:00Z'
                expiresAt: '2026-10-02T12:05:00Z'
        '410':
          description: Card archived or payment session unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit exceeded. The response body is determined by the
            rate-limit middleware.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    SessionStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - pending
            - completed
        expiresAt:
          type: string
          format: date-time
        completedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        cardType:
          anyOf:
            - type: string
              enum:
                - coupon
                - loyalty
                - status
                - points
            - type: 'null'
        amount:
          anyOf:
            - type: integer
              description: Coupon deduction in cents; null for other types.
            - type: 'null'
      required:
        - status
        - expiresAt
        - completedAt
        - cardType
        - amount
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error.
        errorCode:
          type: string
          description: >-
            Handler errors include a machine-readable code; middleware errors
            may omit it.
      required:
        - error

````

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