Skip to main content
The Clink API is currently in development, and available features are limited.

Base Endpoints

The Clink API follows REST principles and requires HTTPS for all requests to ensure data security, integrity, and privacy. API endpoints for different environments:

Authentication

Clink uses API keys in request headers for security. A dynamic timestamp is also required — in production it must be within 2 minutes of platform time (the sandbox is more lenient). Generate it when you make the call rather than relying on the tolerance window.

Response codes

We use standard HTTP status codes to indicate the outcome of API requests: 2xx codes indicate successful requests 4xx codes indicate client-side errors 5xx codes indicate server-side issues

Agent Portal APIs

The Agent Portal APIs (/agent/platform/**) let a platform read and manage one user’s Clink account on that user’s behalf. For capabilities and integration options, see Agent Portal. They use the base endpoints above; this section covers what differs.

Portal token authentication

The Agent Portal APIs do not use an API key. Send a portal token in the request header instead. The endpoint that issues portal tokens uses the platform client token itself.
The gateway verifies aud=clink-agent-platform-portal, token_use=access, and the required scope, then passes the verified customer identity to cwallet. There is no request parameter for selecting a different customer or email. The APIs are scoped to the token’s sub customer. Reads require portal:read; writes require portal:write and act only on that customer’s data.

Response format

Clink responses use the standard envelope:
Business errors use the standard envelope without data: code is a numeric business code and msg is a human-readable description. Judge an error by the HTTP status together with code, not by a string error code.

Status codes

These status codes have a different meaning in the Agent Portal APIs, or appear only there. Other status codes are as listed above.

Common behavior

  • pageNum and pageSize use 1-based pagination.
  • Lists are scoped to the customer, not to an Agent. Orders, refunds, and authorizations created by any Agent for that customer are returned.
  • Writes are limited to the user’s own risk rules, billing address, purchase instructions, card-binding sessions, payment credentials, payment results, and payment methods. All other endpoints are read-only.
  • Request amounts on the write endpoints are decimal strings in major currency units: "12.50" means USD 12.50. Do not send minor units.

Endpoint list