---
title: "Create a payment intent"
method: POST
path: "/poslink/v1/tabs/{tab_id}/payment-intents"
tags: ["Pay at Table"]
---

# Create a payment intent

`POST /poslink/v1/tabs/{tab_id}/payment-intents`

## Request

- Base URL: `https://api.teya.com`
- URL: `https://api.teya.com/poslink/v1/tabs/{tab_id}/payment-intents`
- Auth: OAuth 2
  - Authorization code: `https://id.teya.com/oauth/v2/oauth-authorize`
  - Token URL: `https://id.teya.com/oauth/v2/oauth-token`
- TypeScript: <https://skmtc.dev/teya/apis/poslink-api/docs/poslink/v1/tabs/:tab_id/payment-intents/post.ts> (a function with typed inputs; its response is checked against the schema)

Terminal initiates a payment intent for a tab. The tab transitions to
`PAYING` if it is in `OPEN` or `PAUSED`; PAYING tabs are no-op idempotent.
On a `PAUSED → PAYING` transition POSLink auto-emits a `TAB_RESUMED` SSE
event before the `PAY_REQUEST`. The ePOS then calls POST /v3/payment-requests
(with tab_id and payment_type) to materialise the payment. Supports FULL and
SPLIT payment types with CARD or CASH methods.

## Path parameters

- `tab_id` string, uuid, required

## Request body

- PayIntentRequest: Request from terminal to initiate a payment intent
  - `terminal_id` string, required: The terminal identifier
  - `amount` TabAmountWithCurrency, required: Amount with currency for tab operations
    - `amount` integer, required: Amount in smallest currency unit (e.g., cents)
    - `currency` string, required: ISO 4217 currency code
  - `method` 'CARD' | 'CASH', required: Payment method
  - `type` 'FULL' | 'SPLIT', required: Payment type

## Response `202`

Payment intent accepted and forwarded to ePOS

- PayIntentResponse: Response after creating a pay intent
  - `tab_id` string, uuid: Tab identifier
  - `terminal_id` string: Terminal that initiated the pay intent
  - `amount` TabAmountWithCurrency: Amount with currency for tab operations
    - `amount` integer, required: Amount in smallest currency unit (e.g., cents)
    - `currency` string, required: ISO 4217 currency code
  - `method` 'CARD' | 'CASH': Payment method
  - `type` 'FULL' | 'SPLIT': Payment type
  - `status` 'FORWARDED': Intent status
  - `show_bill_expires_at` string, date-time: Show-bill expiry timestamp (ISO 8601, UTC), updated by this pay intent. Null when no show-bill is active for the tab.

## Other responses

- `400`: Bad request
- `401`: Lacks valid authentication credentials for the requested resource
- `403`: The server understands the request but refuses to authorize it
- `404`: Tab not found
- `408`: Request timeout
- `409`: Conflict — tab is not in a payable state (TAB_NOT_PAYABLE), or requested amount exceeds remaining balance
- `415`: Unsupported media type
- `429`: Too many requests in a given amount of time
- `500`: Internal Server Error

---

[API](https://skmtc.dev/teya/apis/poslink-api.md) - [All operations](https://skmtc.dev/teya/apis/poslink-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teya/apis/poslink-api/revisions/29d7e332e1dd?raw)
