Skip to main content
If an AI coding agent is already building your project, you can have it wire Clink in rather than following the docs step by step. 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 your code. If you are writing it yourself, Hosted Checkout is more direct.Both paths produce the same result — the agent just does the typing. You still have to understand and verify what it writes.

What the agent does

  • Surveys your project structure, entry points, routes, and how environment variables are injected, before deciding how to integrate
  • Scans your 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 your environment
  • Hands back curl examples, a start command, and verification results

What it does not do for you

Decide your business logic. What you sell, how you price it, and your refund policy are yours to define. 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.

Step 1: Have the agent install the skill

The easiest way is to tell the agent directly:
Or install it into your local skills directory yourself:
The skill needs no extra runtime dependencies — the CLI it uses is bundled inside.
The skill follows the Codex skill format and lives under ~/.codex/skills/. If your agent does 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 will ask you 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 check for yourself too.

Step 3: Verify it yourself

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 gives you and pay in full with test card 4242 4242 4242 4242. Without a real payment, nothing is proven.
3

Check your own order

The row in your 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 you to paste a productId by hand. If your site already has a pricing page, it should scan it and use clink catalog import rather than making you copy IDs.

Next

Hosted Checkout

Understand the code the agent wrote, especially the webhook half.

Go live

The checklist before switching to production.