This path suits projects where an agent is already editing the code. For hand-written integrations, Hosted Checkout is more direct.Both paths produce the same result — the agent just does the typing. What it writes still has to be understood and verified.
What the agent does
- Surveys the project structure, entry points, routes, and how environment variables are injected, before deciding how to integrate
- Scans the existing pricing page or product data, generates
clink-catalog.json, and imports it as Clink products and prices - Writes the server-side checkout, subscription, and webhook endpoints
- Registers the webhook endpoint and syncs the signing secret into the project environment
- Hands back curl examples, a start command, and verification results
What it does not cover
Decide the business logic. What is sold, how it is priced, and the refund policy are merchant decisions. Prove that payments actually work. Someone has to open thecheckoutUrl, pay with a test card, and confirm the local order became paid and fulfillment ran. An agent saying “integration complete” is not evidence that any of that happened.
Go to production. The skill works in the sandbox by default; switching to production goes through Go Live.
Prepare a disposable key
The agent reads and writes project files, runs commands, and may send their contents to a model provider along the way. Provision its key on the assumption that it could leak:- Sandbox keys only (
sk_uat_). A production key should never reach anywhere the agent can read. - Initialize a fresh key for this integration rather than reusing the one the team works with day to day.
- Once the integration is signed off, revoke that key under Developers > API Keys and issue a separate one for production.
- Treat the webhook signing key the same way: register the production endpoint separately and take a new key with it.
Step 1: Have the agent install the skill
The easiest way is to tell the agent directly:clink-integ-cli is bundled inside at vendor/clink-integ-cli/clink-integ-cli.
The skill follows the Codex skill format and lives under
~/.codex/skills/. For agents that do not support that format, ask it to read the GitHub repository directly instead; the skill’s own prompts include that fallback.Step 2: Send it the prompt
Copy this whole block to the agent:sk_uat_.
Step 3: Verify the result
Do not skip this. “Integration complete” from an agent and payments actually working are different claims.1
Search the frontend bundle
Confirm the browser cannot reach any
sk_ key or the webhook signing secret.2
Actually pay once
Open the
checkoutUrl the agent returns and pay in full with test card 4242 4242 4242 4242. Without a real payment, nothing is proven.3
Check the merchant order
The row in the local database should be paid, and shipping, top-up, or entitlement logic should have actually run.
4
Read the webhook handler line by line
This is the part an agent is most likely to get wrong. Five things have to be right:
- The signature is verified against the raw request body, not one that was parsed and re-serialized
X-Clink-SignTypeis checked againstSHA256- The business object is read from
event.data.object, notevent.data - Events are deduplicated by
event.id - Orders are matched on both
merchantReferenceIdandsessionId
5
Work through the launch checklist
Before production, go through Go Live line by line.
Common situations
The agent says it is done, but nobody paid. That only means a Session was created. Ask it to separate “session created” from “payment succeeded” — the skill requires that distinction. The project has no backend. A purely static site cannot integrate, because the Secret Key must live on a server. Have the agent add a minimal backend route or serverless function first. The agent asks for a productId to be pasted by hand. Where the site already has a pricing page, it should scan that and useclink catalog import rather than requiring IDs to be copied manually.
Next
Hosted Checkout
Understand the code the agent wrote, especially the webhook half.
Go live
The checklist before switching to production.