---
title: "Register ePOS application and retrieve M2M client credentials"
method: POST
path: "/poslink/v1/epos/register"
tags: ["ePOS Registration"]
---

# Register ePOS application and retrieve M2M client credentials

`POST /poslink/v1/epos/register`

## Request

- Base URL: `https://api.teya.com`
- URL: `https://api.teya.com/poslink/v1/epos/register`
- 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/epos/register/post.ts> (a function with typed inputs; its response is checked against the schema)

This API registers an ePOS application and returns M2M (machine-to-machine) client credentials.
The endpoint returns OAuth client credentials based on the provided store_id and epos_external_id.
The client credentials can be used to obtain M2M access tokens for subsequent API calls.

**Authentication:**

This endpoint requires a user JWT token (not M2M credentials). The user must have access to the specified store.

**Returned Scopes:**

The response includes OAuth scopes that define which APIs can be accessed with the returned M2M credentials:
- `payment_requests`: Required to create, list, and cancel or update payment requests.
- `payment_requests/id`: Required to retrieve and follow an individual payment request.
- `stores/id/terminals`: Required to list stores and their terminals.
- `refunds`: Required for refund operations

**Using the Returned Credentials:**

The returned client credentials are used to obtain an M2M access token via OAuth2 client credentials flow. The access token must include the scopes returned in this response to call the corresponding APIs.

**Idempotency Behavior:**
- The API is idempotent based on the composite key: (partner_id from JWT, store_id, epos_external_id)
- The response body structure is identical for both status codes, containing the same client credentials.

**Idempotency Key:** (partner_id, store_id, epos_external_id)

## Request body

- EposRegisterRequest: Request body for ePOS registration
  - `store_id` string, uuid, required: Store ID
  - `epos_external_id` string, required: External identifier for the ePOS application/client

## Response `200`

Client credentials returned

- EposRegisterResponse: Response body for ePOS registration containing M2M client credentials
  - `client_id` string: OAuth client ID
  - `client_secret` string: OAuth client secret
  - `scopes` string[]: OAuth client scopes granted to the M2M client credentials. These scopes define the permissions available for subsequent API calls. The following scopes are returned: - `payment_requests`: Access to payment requests endpoints (list operations) - `payment_requests/id`: Access to individual payment request endpoints (by ID) - `stores/id/terminals`: Access to store terminals endpoints - `refunds`: Access to refunds endpoints

## 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`: Store not found
- `408`: Request timeout
- `424`: Failed dependency
- `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/cc7c1bd11e93?raw)
