sub customer. Reads require portal:read; writes require portal:write and act only on that customer’s data.
Authentication
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.
Clink responses use the standard envelope:
data.
Common behavior
pageNumandpageSizeuse 1-based pagination.- Order lists accept
status,from, andtofilters. - Lists are scoped to the customer, not to an Agent. Orders, refunds, and authorizations created by any Agent for that customer are returned.
- A missing record, or a record owned by another customer, is returned as
404. - 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.
Get account
List payment methods
status is ACTIVE or DISABLED. PAN and CVV are never returned. is_default identifies the card used by default; the default card can be deleted.
To add a card, use Bind a card. To bind a card and authorize a purchase in one flow, omit payment_instrument_id in Create instruction. To remove a card, use Delete payment method.
Bind a card
Creates a short-lived card-binding session for the token’s customer and returns a URL that the user opens to add a card. Requiresportal:write.
This endpoint does not create an instruction and does not authorize spending. Use it when the user only needs to add a card. To bind a card and sign in one flow, omit payment_instrument_id in Create instruction instead.
Response
Each call creates a new, independent session with a short TTL. When the user opens the link and completes the card-binding ceremony, the card is added to the customer’s payment methods (List payment methods). No instruction or authorization is created. The link can be reopened or re-exchanged while the session is still pending; it stops working once the card-binding ceremony completes or the session expires.
Delete payment method
Deletes one of the token’s customer’s payment methods. Requiresportal:write.
A successful deletion returns
200 with deleted: true. The deletion is immediate and the response does not include a user-facing page URL. A payment method that does not exist, or that belongs to another customer, returns the same 404, so the response does not reveal whether another customer’s card exists. The default card can be deleted. Repeating the request after a successful deletion returns 404.
List orders
truncated: true means the status/time filtered scan reached Clink’s internal scan bound; total describes the records scanned, not necessarily the customer’s complete matching history. Without filters, the endpoint reads one page and does not use the bounded scan.
Get order
agent_info, and a refund_summary:
List refunds
Get refund
404.
List authorizations
Get authorization
mandates, and usages. usages are raw usage records; compute used and remaining amounts from them when rendering the portal. An instruction owned by another customer is returned as 404.
client_reference_id in authorization responses is the instruction’s own field. For instructions created through the portal, Clink generates a random value for it; it is not the create request’s request_id and not the client_reference_id sent to Get credential and Report credential result. Do not use it to reconcile a purchase.
Create instruction
Creates a purchase instruction (spending authorization) for the token’s customer and returns a short-lived activation link that the user opens to approve it with a Passkey. Requiresportal:write.
payment_instrument_id selects one of two signing modes:
For the first mode, read
payment_instrument_id from List payment methods. In the second mode, do not send a card number, CVV, or any other card field; the user enters card details on the Clink page. Customer identity always comes from the token; the request body has no customer or email field.
After the activation link’s signing session is exchanged, an existing-card instruction continues to /authorize/{paymentInstrumentId}?instructionId=...; a bind-and-sign instruction continues to /bind-authorize?instructionId=..., where the user binds a card and authorizes in one Passkey ceremony.
Request fields
Each mandate contains:
Example request
- Sign with an existing card
- Bind a card and sign
Response
- Sign with an existing card
- Bind a card and sign
Activate the instruction
Creating an instruction is not an authorization. An instruction with an existing card isCREATED; an instruction that will bind a card is PENDING. Both become ACTIVE only after the user completes Passkey verification on Clink’s page. The link can be reopened or refreshed while it is valid, but the instruction can be signed only once.
- Send the user to
activation_urlin a browser. - For
CREATED, the user reviews the card and completes Passkey verification. ForPENDING, the user binds a card and completes Passkey verification in the same ceremony. The page establishes the browser session and continues to the authorization step. - Poll
GET /agent/platform/authorizations/{instructionId}untilstatusisACTIVE.
CREATED or PENDING and authorizes no spending. Only send the link to the intended user; it is an activation link, not a portal token.
Idempotency
request_id is the idempotency key, and the rules are identical in both signing modes. Clink keeps the idempotency record for 24 hours by default; after that window, retrying the same request_id creates a new instruction. Within the window, retrying with identical parameters returns the same instruction_id; a normal retry on an instruction that is not yet signed returns a fresh activation link. If the retried request_id refers to an instruction that is already signed or final, Clink returns the instruction without a new activation_url or activation_expires_at (both fields are omitted); read GET /agent/platform/authorizations/{instructionId} for the current status. Reusing a request_id with different parameters returns 409 with code 71211011 (portal_conflict).
Get credential
Requests a single-use payment credential for one purchase against an activated instruction and mandate. Requiresportal:write.
The response has two modes, depending on whether your platform has a public key registered with Clink:
- Registered public key (
matched: true): Clink seals the card fields into akey/payloadenvelope that only your platform can decrypt with the matching private key. - No registered public key (
matched: false): when plaintext mode is enabled server-side and gateway response redaction is live, Clink returns the DPAN and dynamic CVV in plaintext in the response. The card can be used directly, but these fields reach your backend in plaintext.
Public key registration
Contact Clink to register your platform’s RSA public key in each environment; it is mapped to your platform client name. The registered key selects the response mode: with a key the credential is sealed to it; without one, Clink returns plaintext card fields only when plaintext mode is enabled server-side and gateway response redaction is live (the MCP-equivalent fallback). With the default gate off, the endpoint fails closed instead. Register the key before production use.Request fields
Each product in
products contains:
Example request
Response
matched selects the response shape.
- Sealed (matched: true)
- Plaintext (matched: false)
Clink seals the credential to your registered public key. The card fields are inside
payload.
The sealed response contains only
matched, key, payload, and expires_at; in that mode card, display, and the ID fields are omitted and the IDs are inside the decrypted payload. The plaintext response contains no key or payload.
Plaintext card fields:
In plaintext mode, number and securityCode are always present; the remaining fields are optional and omitted when not provided.
Decrypt the sealed response
Whenmatched is true, decrypt key and payload with your platform private key. The decrypted payload contains orderId, paymentExecutionDetailId, clientReferenceId, status, the network credential (DPAN, dynamic CVV, and expiry), and cardholder and address fields. The envelope format and a decryption example are in Decryption.
Keep decrypted card fields out of logs, model input, and ordinary records, and use the validity information in the decrypted payload to decide when to use the credential; expires_at is only an estimate. Save client_reference_id; Report credential result uses it.
Idempotency
client_reference_id is the idempotency key. Retrying with the same client_reference_id returns the same credential: the same sealed envelope when matched is true, and in plaintext mode the same card from the server-side encrypted cache, with no second issuance. Reusing it with different parameters returns 409 with code 71211011 (portal_conflict).
Report credential result
Reports the outcome observed on the merchant page after using a credential. Requiresportal:write. Clink uses the report to close the order and the instruction usage. A report records what the merchant page showed; it does not execute or verify the payment.
This is the payment result confirmation endpoint. It is the only entry point for confirming or reporting a transaction result; there is no separate confirm-transaction API. Use it to report the final outcome, including after an
UNKNOWN report, within the 24-hour reporting window described below.Request fields
failure_reason accepts CARD_DECLINED, AUTHENTICATION_REQUIRED, AMOUNT_CHANGED, CREDENTIAL_EXPIRED, CREDENTIAL_LOST, MERCHANT_ERROR, BUYER_CANCELLED, or OTHER.
Example request
Response
Reporting rules
- Clink accepts a terminal result until
report_deadline, 24 hours after the credential is issued. A report after the window returns410withcode71211018(report_window_expired). - A usage that does not exist, or does not belong to the token’s customer, returns
404. - Clink compares terminal results in two classes:
SUCCEEDEDis success;FAILEDandNOT_SUBMITTEDare both failure. Repeating a result in the same class returns the recorded result with HTTP200; for example, reportingFAILEDafterNOT_SUBMITTEDdoes not conflict. Reporting the other class after a terminal result is recorded returns409withcode71211017(result_already_reported). SUCCEEDED,FAILED, andNOT_SUBMITTEDclose the usage and are delivered to Clink’s existing payment-result pipeline.UNKNOWNrecords no terminal result, publishes no result message, and returnsPENDING; report the final outcome beforereport_deadline.paid_amountandcurrency_codemust be sent together. Whenpaid_amountdiffers from the authorized amount, Clink recordspaid_amount_mismatch: trueand keeps the authorized amount.
Risk rules
Read and replace the user’s global default risk rules. The update is a full replacement of the settings object.autoSuspendEnabled is a fixed safety behaviour in the current version: Clink always returns true, and the value is ignored on write. It is present in the request schema for compatibility, but it cannot disable auto-suspend. The PUT response returns the saved settings. A portal:read-only token can read this endpoint but receives 403 on PUT.
Billing address
Read or replace the user’s billing address.portal:read-only token receives 403 on PUT.
Errors
Business errors use the standard envelope withoutdata: 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.