# Clink Documentation ## Documentation ### Get Started - [Introduction](https://docs.clinkbill.com/index.md): Clink aims to provide a simplified but solid subscription and payment solution. - [How Payments Work](https://docs.clinkbill.com/how-payments-work.md): Checkout Session, Order, and the merchant order — what each one actually means. - [Quickstart](https://docs.clinkbill.com/quickstart.md): Run one complete payment in the sandbox, from creating a Session to confirming the money arrived. #### Changelog - [July 2026 Changelog](https://docs.clinkbill.com/changelog/july-2026.md): Agentic Payment, Pay by Link, and cross-currency payment updates - [June 2026 Changelog](https://docs.clinkbill.com/changelog/june-2026.md): Subscription orchestration, smart routing, and product portfolio finance updates ### Integration - [Subscriptions](https://docs.clinkbill.com/subscriptions.md): Recurring prices, the first subscription, renewals, cancellation, and plan changes. - [Discounts and Promotion Codes](https://docs.clinkbill.com/promotions.md): Creating coupons and codes, and applying them across every integration path. - [Integrate with an AI Agent](https://docs.clinkbill.com/agent-integration.md): Hand a prompt to the agent already writing the code and let it do the integration. #### Integration methods - [Choose an Integration](https://docs.clinkbill.com/choose-integration.md): Three ways to host checkout, four server-side paths, and when each one fits. - [Hosted Checkout](https://docs.clinkbill.com/build-integration.md): What to write on the backend, the frontend, and the webhook handler. - [Elements](https://docs.clinkbill.com/elements.md): Embed Clink payment inputs in a merchant-owned checkout page, with the server still creating the Session. ### Agent Solutions - [Get started with Clink Agent Pay](https://docs.clinkbill.com/guides/agent/get_started.md): Understand Clink Agent Pay, payment protocol routing, Vault Services, and Agent Portal options. - [Wallet Service](https://docs.clinkbill.com/guides/agent/wallet_service.md): Read a user’s wallet, manage payment cards, and create spending authorizations. - [UCP Pay](https://docs.clinkbill.com/guides/agent/ucp_pay.md): Complete a product checkout through Clink UCP. - [Quick Pay](https://docs.clinkbill.com/guides/agent/quick_pay.md): Create and track an Agent Payment Session. #### Choose your integration - [Choose your Agent integration](https://docs.clinkbill.com/guides/agent/overview.md): Identify your role first: Agent users use MCP directly, and Agent platforms then choose an MCP-based or API-based integration. - [Local Agent quickstart](https://docs.clinkbill.com/guides/agent/quickstart.md): Install the Clink Skill, connect MCP, and authorize your wallet in an Agent Host. ##### Agent platform developer - [How to integrate MCP](https://docs.clinkbill.com/guides/agent/platform_integration/mcp_integration.md): Prepare Clink platform credentials, configure the agent system prompt, and connect Clink MCP in your agent framework. - [How to integrate RESTful API](https://docs.clinkbill.com/guides/agent/platform_integration/restful_api.md): Learn how to integrate the Customer Portal API and Browser Pay through the Clink RESTful API to build Agent payment capabilities. - [How to integrate Vault SDK](https://docs.clinkbill.com/guides/agent/platform_integration/vault_sdk.md): Configure the platform boundary around Agent Vault SDK without rereading the SDK payment guide. - [How to get platform credentials](https://docs.clinkbill.com/guides/agent/platform_credentials.md): Request a client_id and client_secret from Clink, and learn which integration each of the three registration methods (Pre-registration, CIMD, and DCR) applies to. #### Browser Pay - [Browser Pay](https://docs.clinkbill.com/guides/agent/browser_pay.md): Use a wallet payment credential on a merchant website, then report the actual payment result. - [Decryption](https://docs.clinkbill.com/guides/agent/browser_pay/decryption.md): Use the decryption example to read payment credentials and fill the merchant card form. #### Agent Vault SDK - [Agent Vault SDK](https://docs.clinkbill.com/guides/agent/vault_sdk.md): Let an Agent pay through the merchant’s own PSP while the real card stays inside Clink’s PCI boundary. - [SDK API reference](https://docs.clinkbill.com/guides/agent/vault_sdk/api_reference.md): Client options, account APIs, attach options, and checkout methods in the Agent Vault SDK. #### Agent Portal - [Agent Portal](https://docs.clinkbill.com/api-reference/agent-portal/overview.md): Choose a hosted Agent Portal experience through MCP or build a customized portal with Agent Portal APIs. - [Portal token](https://docs.clinkbill.com/api-reference/agent-portal/portal_token.md): Exchange a platform client token for a portal user token with read access and scoped write access. - [Portal APIs](https://docs.clinkbill.com/api-reference/agent-portal/portal_apis.md): Read account data, create purchase instructions with a short-lived activation link, bind or delete payment methods, request payment credentials, and report merchant payment results with a portal token. ### Configure & Launch - [API Keys & Webhooks](https://docs.clinkbill.com/integration.md): Generating, rotating, and restricting API keys; registering, verifying, and receiving webhooks. - [Go Live](https://docs.clinkbill.com/go-live.md): What to verify, what to change, and how to debug when switching to production. - [SFTP Configuration](https://docs.clinkbill.com/finance/sftp.md): Download daily settlement files over SFTP ### Guides #### Manage Your Account - [Merchant](https://docs.clinkbill.com/guides/account/merchant.md): The operating unit for your business. - [User](https://docs.clinkbill.com/guides/account/user.md): Manage dashboard users and permissions #### Core Resource - [Product & Price](https://docs.clinkbill.com/guides/resources/product.md): Managing products and pricing structures - [Customer](https://docs.clinkbill.com/guides/resources/customer.md): Managing your customer base - [Order](https://docs.clinkbill.com/guides/resources/order.md): Understanding payment transactions - [Subscription](https://docs.clinkbill.com/guides/resources/subscription.md): Understanding the recurring payment contract - [Refund](https://docs.clinkbill.com/guides/resources/refund.md): Refund and Chargeback Policies - [Coupon](https://docs.clinkbill.com/guides/resources/coupon.md): Create and manage discounts for bills, subscriptions, and customer accounts. #### Payments - [Checkout Session](https://docs.clinkbill.com/guides/payments/checkout_session.md): A hosted checkout page experience - [Google Pay™](https://docs.clinkbill.com/guides/payments/google_pay.md): Accept Google Pay through Clink Hosted Checkout or Elements, with gateway configuration and PAN_ONLY authentication requirements. - [Currencies](https://docs.clinkbill.com/guides/payments/currencies.md): Enable customers to pay in their local currency - [Link External Account](https://docs.clinkbill.com/guides/payments/link_psp.md): Connect with your existing payment processors #### Billing - [Customer Portal](https://docs.clinkbill.com/guides/billing/customer_portal.md): Empower customers to manage their own subscriptions and billing #### Agent - [Skill Marketplace](https://docs.clinkbill.com/guides/agent/skill_marketplace.md): Prepare, submit, publish, and manage Skills in the Clink Skill Marketplace. ### Finance - [Balance](https://docs.clinkbill.com/finance/balance.md): Understanding fund management and financial flows - [Payout](https://docs.clinkbill.com/finance/payout.md): Understanding payout processes and timing expectation - [Simple, transparent pricing](https://docs.clinkbill.com/finance/pricing.md): Simple, transparent pricing for global payments, billing, tax, compliance, and agentic commerce. ## API Reference ### API Documentation - [Introduction](https://docs.clinkbill.com/api-reference/introduction.md): API Reference and Integration Guide - [TypeScript SDK](https://docs.clinkbill.com/api-reference/SDK.md): The official Node.js library for the Clink API. - [JavaScript SDK](https://docs.clinkbill.com/api-reference/javascript_sdk.md): Launch Clink Checkout from browser applications with redirect or embedded flows. - [Clink CLI](https://docs.clinkbill.com/api-reference/clink_cli.md): Use clink-cli to initialize customer wallets, manage card links, pay, refund, and inspect risk rules from the command line. ### Clink MCP - [Wallet MCP tools](https://docs.clinkbill.com/api-reference/mcp/wallet.md): Tool inputs, scopes, and results for wallet cards and purchase instructions. - [Browser Pay tools](https://docs.clinkbill.com/api-reference/mcp/browser_pay.md): Get a website payment credential and report the merchant result through Clink MCP. - [Operations and recovery](https://docs.clinkbill.com/api-reference/mcp/operations.md): Read current MCP rules, handle next_action, and resume an existing operation safely. - [Catalog and UCP Checkout](https://docs.clinkbill.com/api-reference/mcp/commerce.md): Supplementary MCP reference for product discovery, checkout, orders, and digital delivery. - [Agent Platform MCP Login](https://docs.clinkbill.com/api-reference/mcp/agent_platform_login.md): Exchange a platform client token for a user MCP session, with an authorization fallback for first-time users. ### Agent Portal - [Agent Portal](https://docs.clinkbill.com/api-reference/agent-portal/overview.md): Choose a hosted Agent Portal experience through MCP or build a customized portal with Agent Portal APIs. - [Portal token](https://docs.clinkbill.com/api-reference/agent-portal/portal_token.md): Exchange a platform client token for a portal user token with read access and scoped write access. - [Portal APIs](https://docs.clinkbill.com/api-reference/agent-portal/portal_apis.md): Read account data, create purchase instructions with a short-lived activation link, bind or delete payment methods, request payment credentials, and report merchant payment results with a portal token. ### Checkout Session - [Create Checkout Session](https://docs.clinkbill.com/api-reference/endpoint/create-checkout-session.md): Create a new checkout session for payment processing - [Get Checkout Session](https://docs.clinkbill.com/api-reference/endpoint/get-checkout-session.md): Retrieve details of an existing checkout session - [Expire Checkout Session](https://docs.clinkbill.com/api-reference/endpoint/expire-checkout-session.md): Expire a checkout session that is still `open`. Once expired, the checkout page can no longer be used to complete a payment, and a checkout session webhook event with status `expired` is delivered. A session cannot be expired if it has already been completed, has already expired, or has a payment in… ### Payment - [Create Payment](https://docs.clinkbill.com/api-reference/endpoint/create-payment.md): Create a one-time payment with an existing payment instrument, or omit paymentInstrumentId for payment methods that support automatic payment instrument creation. Use either productId and priceId, or amount and currency. To charge in a different payment currency, provide paymentCurrency and Clink wi… - [Refresh Wallet QR Code](https://docs.clinkbill.com/api-reference/endpoint/refresh-wallet-qrcode.md): Refresh the wallet QR code for an existing order. Currently only supports CASHAPP wallet payments. ### Payment Instrument - [Create Payment Instrument](https://docs.clinkbill.com/api-reference/endpoint/create-payment-instrument.md): Create a new payment instrument for a customer. The request resolves or creates the customer first, then stores the payment instrument under that customer. ### Order - [List Orders](https://docs.clinkbill.com/api-reference/endpoint/list-orders.md): List orders under your current merchant account. You can filter orders by subscription ID, customer ID, or merchant reference ID. - [Get Order](https://docs.clinkbill.com/api-reference/endpoint/get-order.md): Get detailed information about a specific order ### Agent Payment Session - [Create Agent Payment Session](https://docs.clinkbill.com/api-reference/endpoint/create-agent-payment-session.md): Create agent payment session - [Get Agent Payment Session](https://docs.clinkbill.com/api-reference/endpoint/get-agent-payment-session.md): Get agent payment session ### Refund - [Create Refund](https://docs.clinkbill.com/api-reference/endpoint/create-refund.md): Create a refund for an existing order. The refundMerchantOrderId is used for idempotency. - [Get Refund](https://docs.clinkbill.com/api-reference/endpoint/get-refund.md): Get detailed information about a specific refund ### Product - [Upload Product Image](https://docs.clinkbill.com/api-reference/endpoint/upload-product-image.md): Upload a product image as multipart form data. The file must be an image and must not exceed 5 MB. - [Create Product](https://docs.clinkbill.com/api-reference/endpoint/create-product.md): Create a product with one or more price configurations. Product names can include localized values for multiple languages. - [Get Product](https://docs.clinkbill.com/api-reference/endpoint/get-product.md): Get product information under your current merchant account based on the product ID - [Get Product List](https://docs.clinkbill.com/api-reference/endpoint/get-product-list.md): Get all product information under your current merchant account ### Price - [Create Price](https://docs.clinkbill.com/api-reference/endpoint/create-price.md): Create a price for an existing product under your current merchant account. - [Get Price](https://docs.clinkbill.com/api-reference/endpoint/get-price.md): Get price information under your current merchant account based on the price ID - [Get Price List](https://docs.clinkbill.com/api-reference/endpoint/get-price-list.md): Get all price information under your current merchant account - [Update Price](https://docs.clinkbill.com/api-reference/endpoint/update-price.md): Update a price under your current merchant account based on the price ID. ### Coupon - [Create Coupon](https://docs.clinkbill.com/api-reference/endpoint/create-coupon.md): Create a coupon and optionally create promotion codes for it. - [List Coupons](https://docs.clinkbill.com/api-reference/endpoint/list-coupons.md): List coupons under your current merchant account with optional filters. - [Get Coupon](https://docs.clinkbill.com/api-reference/endpoint/get-coupon.md): Get detailed information about a specific coupon, including its promotion codes. - [Rename Coupon](https://docs.clinkbill.com/api-reference/endpoint/rename-coupon.md): Update the display name of a coupon. ### Promotion Code - [Create Promotion Code](https://docs.clinkbill.com/api-reference/endpoint/create-promotion-code.md): Create a promotion code for a coupon. - [Get Promotion Code](https://docs.clinkbill.com/api-reference/endpoint/get-promotion-code.md): Get detailed information about a specific promotion code. - [List Promotion Codes by Coupon](https://docs.clinkbill.com/api-reference/endpoint/list-promotion-codes-by-coupon.md): List promotion codes attached to a coupon. - [Activate Promotion Code](https://docs.clinkbill.com/api-reference/endpoint/activate-promotion-code.md): Activate a promotion code. - [Deactivate Promotion Code](https://docs.clinkbill.com/api-reference/endpoint/deactivate-promotion-code.md): Deactivate a promotion code. ### Subscription - [Create Subscription](https://docs.clinkbill.com/api-reference/endpoint/create-subscription.md): Create a subscription and initiate its first payment. Provide an existing payment instrument, or omit paymentInstrumentId for payment methods that support automatic payment instrument creation. You can provide billingAddress for the payment instrument and first-invoice tax calculation. - [Get Subscription](https://docs.clinkbill.com/api-reference/endpoint/get-subscription.md): Get detailed information about a specific subscription - [Preview Subscription Update](https://docs.clinkbill.com/api-reference/endpoint/preview-subscription-update.md): Preview a subscription upgrade or downgrade before confirming it. The target price must be a recurring price owned by the current merchant and must support the subscription payment currency. Use immediate to request an immediate or period-end update, or omit it to let the system decide. billingCycle… - [Confirm Subscription Update](https://docs.clinkbill.com/api-reference/endpoint/confirm-subscription-update.md): Confirm a subscription upgrade or downgrade using the target price snapshot returned by the preview API. Send the same quantity, promotionCode, immediate, billingCycleAnchor, and prorationBehavior values used in the preview request, including omitting options that were omitted during preview. These… - [Cancel Subscription Update](https://docs.clinkbill.com/api-reference/endpoint/cancel-subscription-update.md): Cancel a pending subscription plan update that has not taken effect yet. - [Cancel Subscription](https://docs.clinkbill.com/api-reference/endpoint/cancel-subscription.md): Cancel a subscription either immediately or at the end of the current billing period. - [Get Invoice](https://docs.clinkbill.com/api-reference/endpoint/get-invoice.md): Get detailed information about a specific invoice ### Test Clock - [List Test Clocks](https://docs.clinkbill.com/api-reference/endpoint/list-test-clocks.md): List all active test clocks under your current merchant account - [Create Test Clock](https://docs.clinkbill.com/api-reference/endpoint/create-test-clock.md): Create a new test clock for a subscription - [Get Test Clock](https://docs.clinkbill.com/api-reference/endpoint/get-test-clock.md): Retrieve details of a specific test clock - [Advance Test Clock](https://docs.clinkbill.com/api-reference/endpoint/advance-test-clock.md): Advance a test clock to the target frozen timestamp - [Complete Test Clock](https://docs.clinkbill.com/api-reference/endpoint/complete-test-clock.md): Complete a test clock and stop further simulated execution ### Customer Portal - [Customer Portal Session](https://docs.clinkbill.com/api-reference/endpoint/create-customer-portal.md): Create a new customer portal session for billing management ### Webhook Endpoint Management - [List Webhook Events](https://docs.clinkbill.com/api-reference/endpoint/list-webhook-events.md): Return supported webhook events and event aliases. Use event names in webhook endpoint management requests; numeric event codes are returned for reference only. - [List Webhook Endpoints](https://docs.clinkbill.com/api-reference/endpoint/list-webhook-endpoints.md): Get webhook endpoints under the current merchant account. - [Create Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/create-webhook-endpoint.md): Create a webhook endpoint for the current merchant. The endpoint URL must use HTTPS and resolve to a public host. - [Ensure Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/ensure-webhook-endpoint.md): Create or update a webhook endpoint by URL. This endpoint is designed for idempotent setup flows where applications need to safely create or reconcile a webhook endpoint. For existing endpoints, Clink does not return the stored plaintext signing secret unless the secret is rotated. - [Get Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/get-webhook-endpoint.md): Get a webhook endpoint by ID. - [Update Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/update-webhook-endpoint.md): Update URL, events, description, or enabled status for a webhook endpoint. Omitted fields remain unchanged. - [Enable Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/enable-webhook-endpoint.md): Enable a webhook endpoint. - [Disable Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/disable-webhook-endpoint.md): Disable a webhook endpoint. Disabled endpoints are saved but do not receive webhook events. - [Rotate Webhook Signing Secret](https://docs.clinkbill.com/api-reference/endpoint/rotate-webhook-signing-secret.md): Rotate the signing secret for a webhook endpoint. The previous secret stops working immediately. - [Delete Webhook Endpoint](https://docs.clinkbill.com/api-reference/endpoint/delete-webhook-endpoint.md): Delete a webhook endpoint. Deleted endpoints stop receiving webhook events. ### Webhooks - [order](https://docs.clinkbill.com/api-reference/webhook/order.md): Handles order lifecycle events. - [refund](https://docs.clinkbill.com/api-reference/webhook/refund.md): Webhook notification triggered when refund is created or updated - [subscription](https://docs.clinkbill.com/api-reference/webhook/subscription.md): Webhook notification triggered when a subscription is created or updated - [invoice](https://docs.clinkbill.com/api-reference/webhook/invoice.md): Webhook notification triggered when an invoice is created or updated - [session](https://docs.clinkbill.com/api-reference/webhook/session.md): Webhook notification triggered when session is completed or expired - [customer.verify](https://docs.clinkbill.com/api-reference/webhook/customer.verify.md): Webhook notification triggered when customer verification is required - [dispute](https://docs.clinkbill.com/api-reference/webhook/dispute.md): Webhook notification triggered when dispute status changes. When a dispute reaches won or lost, an additional dispute.closed event is sent. ## OpenAPI Specs - [openapi](/api-reference/openapi.json) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Chinese (116 pages)](https://docs.clinkbill.com/_llms/cn.txt): 知识库, API 文档. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.