Skip to main content
clink-cli is a command-line client for Clink customer wallet APIs. Use it to initialize customer wallet profiles, open card setup or management pages, make payments, create refunds, and inspect risk rule settings.
Security Note: The CLI can store customer credentials in your local profile. Do not commit ~/.clink-cli/config.json or share values such as customer-api-key.

NPM Package

View the package on npmjs.com

Requirements

  • Node.js >=20
  • Access to the target Clink API environment
The default base URL is:

Installation

Install the CLI globally:
Or run it without a global install:
Every command starts with:

Quick Start

1. Initialize your wallet

Run this once to create or activate a customer wallet and save credentials locally:
Check the saved profile:
The local config file is stored at:

2. Open card pages

Get the raw binding link:
Open the add-card page:
Open the manage-card page:

3. Check saved payment methods

List cached payment methods:
Get one cached payment method:
Notes:
  • Card add, update, and delete actions happen on the web page, not directly in the CLI.
  • card list and card get read local cached data.
  • card binding-link, card setup-link, and card modify-link refresh the local payment method cache.

4. Make a payment

Pay with merchant mode:
Pay with session mode:
If --payment-instrument-id is omitted, pay uses the default cached payment method.

5. Refund an order

Create a full refund:
Check refund status:

6. Check risk rules

Get current risk rule settings:
Open the risk rule page:

Common Usage

Use a named profile:
Override the base URL:
Print requests without executing them:

Commands

Command groups:
  • clink-cli wallet init
  • clink-cli wallet status
  • clink-cli card binding-link
  • clink-cli card setup-link
  • clink-cli card modify-link
  • clink-cli card list
  • clink-cli card get --payment-instrument-id <id>
  • clink-cli risk-rule get
  • clink-cli risk-rule link
  • clink-cli pay --merchant-id <id> --amount <amount> --currency <currency>
  • clink-cli pay --session-id <id>
  • clink-cli refund create --order-id <id>
  • clink-cli refund get --refund-id <id>
  • clink-cli config set <key> <value>
  • clink-cli config get
  • clink-cli config unset <key>
Show help:

Configuration

Useful config commands:
Supported config keys:
  • base-url
  • customer-id
  • customer-api-key
  • default-open-links
  • email
  • name
Resolution order:
  1. Command flags
  2. Environment variables
  3. Saved profile config
Environment variables:
  • CLINK_BASE_URL
  • CLINK_CUSTOMER_ID
  • CLINK_CUSTOMER_API_KEY

Global Options

  • --format <json|pretty>
  • --dry-run
  • --open
  • --profile <name>
  • --base-url <url>
  • --customer-id <id>
  • --customer-api-key <key>
  • --timeout <ms>
  • --help