Skip to main content
When an AI coding agent is already building the project, it can wire Clink in instead of a step-by-step walkthrough. Clink publishes an open-source integration skill, clink-integ-skills, containing the integration rules, an offline CLI, and prompts written for agents. Install it, send the prompt, and let the agent work.
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 the checkoutUrl, 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.
If the agent writes a key into source in plaintext, moving it to an environment variable afterwards is not enough — that revision is already in git history and in the model’s context. Revoke it and issue a new one instead of just deleting the line.

Step 1: Have the agent install the skill

The easiest way is to tell the agent directly:
Or install it into the local skills directory manually:
The skill needs no extra runtime dependencies — 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:
Partway through, the agent asks for a sandbox Secret Key. Initialize one on the Developers page of the sandbox dashboard — it starts with sk_uat_.
Give it the sandbox key only, never a production key. And do not let the agent write keys into source or commit them — the prompt above forbids this, but verify it independently.

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-SignType is checked against SHA256
  • The business object is read from event.data.object, not event.data
  • Events are deduplicated by event.id
  • Orders are matched on both merchantReferenceId and sessionId
Watch the middle two especially — getting them wrong is invisible against simulated events and only surfaces on a real payment. Check each against Hosted Checkout.
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 use clink 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.