OpenClaw Integration

Setting Up OpenClaw

Getting OpenClaw running with Docker and installing the NextPay CLI

Setting Up OpenClaw

The fastest way to get started with OpenClaw is the Docker quickstart. This gives you a fully configured agent environment with the NextPay CLI pre-installed.

Docker quickstart

# Pull the OpenClaw image
docker pull ghcr.io/openclaw-ai/openclaw:latest

# Run with NextPay API key
docker run -it \
  -e NEXTPAY_API_KEY="npk_your_api_key_here" \
  -e NEXTPAY_ENV="dev" \
  ghcr.io/openclaw-ai/openclaw:latest

Installing the CLI inside an existing container

If you already have an OpenClaw instance running, install the NextPay CLI:

curl -L -o /usr/local/bin/nextpay \
  https://github.com/kapitolph/nextpay-cli/releases/latest/download/nextpay-linux-amd64
chmod +x /usr/local/bin/nextpay

Verify the installation:

nextpay --version
nextpay capabilities | head -20

Environment variables

Set these environment variables in your OpenClaw agent configuration:

VariableRequiredDescription
NEXTPAY_API_KEYYesYour NextPay API key for authentication.
NEXTPAY_ENVRecommendeddev or prod. Defaults to prod if not set.
NEXTPAY_WORKSPACE_IDOptionalDefault workspace ID.
NEXTPAY_ORG_IDOptionalDefault organization ID.
NEXTPAY_FORMATOptionalForce json output (usually auto-detected).

AWS Marketplace

OpenClaw is also available as a pre-built AMI on AWS Marketplace. Search for "OpenClaw" in the Marketplace console. The AMI comes with common agent tools pre-installed, including the NextPay CLI.

After launching the instance, SSH in and configure your NextPay API key:

export NEXTPAY_API_KEY="npk_your_api_key_here"
export NEXTPAY_ENV="dev"
nextpay auth status