skills$openclaw/paytrigo-openclawbot
paytrigo3.3k

by paytrigo

paytrigo-openclawbot – OpenClaw Skill

paytrigo-openclawbot is an OpenClaw Skills integration for coding workflows. Use when an OpenClawBot needs to create or verify PayTrigo payments on Base/USDC without webhooks.

3.3k stars725 forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namepaytrigo-openclawbot
descriptionUse when an OpenClawBot needs to create or verify PayTrigo payments on Base/USDC without webhooks. OpenClaw Skills integration.
ownerpaytrigo
repositorypaytrigo/paytrigo-openclawbot
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @paytrigo/paytrigo-openclawbot
last updatedFeb 7, 2026

Maintainer

paytrigo

paytrigo

Maintains paytrigo-openclawbot in the OpenClaw Skills directory.

View GitHub profile
File Explorer
9 files
.
scripts
moltbot-bot-flow.mjs
7.6 KB
moltbot-human-flow.mjs
4.9 KB
moltbot-wallet-setup.mjs
7.2 KB
paytrigo.mjs
5.7 KB
_meta.json
307 B
package.json
130 B
README.md
3.3 KB
SKILL.md
4.6 KB
SKILL.md

name: paytrigo-openclawbot description: Use when an OpenClawBot needs to create or verify PayTrigo payments on Base/USDC without webhooks. metadata: {"openclaw":{}}

PayTrigo (OpenClawBot, Base/USDC)

This skill provides a minimal, bot-friendly payment flow on PayTrigo using a platform API key and Base/USDC only. It is optimized for OpenClawBots that do not run webhooks and instead poll for status. A platform key is embedded in the helper script for no-setup usage.

Assumptions

  • Platform key is used (recipientAddress required).
  • Base/USDC is the only enabled chain/token for this key (from Platform Fee Configs).
  • Bots can store invoiceId and checkoutToken returned from invoice creation.

No environment variables required

The helper script ships with an embedded key, so OpenClawBots can use it immediately.

Requires Node.js 18+.

npm install

Local wallet memory (recommended)

OpenClawBots can store a recipient address and an encrypted payer wallet locally (no external services needed).

1) Create a local wallet store

node {baseDir}/scripts/moltbot-wallet-setup.mjs create --passphrase-file ./passphrase.txt --set-recipient-from-wallet

This creates .openclawbot/wallet.json, .openclawbot/wallet-address.txt, and .openclawbot/recipient.txt.

If you already have a wallet

You do not need to create a new one.

node {baseDir}/scripts/moltbot-wallet-setup.mjs recipient --address 0xYourWallet
node {baseDir}/scripts/moltbot-wallet-setup.mjs import --pk-file ./payer.pk --passphrase-file ./passphrase.txt --set-recipient-from-wallet

2) Run flows using the stored data

node {baseDir}/scripts/moltbot-human-flow.mjs human --amount 0.001
node {baseDir}/scripts/moltbot-bot-flow.mjs bot --amount 0.001 --passphrase-file ./passphrase.txt

3) Optional: set a separate recipient address

node {baseDir}/scripts/moltbot-wallet-setup.mjs recipient --address 0xYourWallet

Quickstart (CLI scripts)

Use the scenario scripts to test end-to-end flows without additional setup.

Human-in-the-loop (user pays in browser)

node {baseDir}/scripts/moltbot-human-flow.mjs human --amount 0.001 --recipient 0xYourWallet...

Bot pays directly (requires private key)

node {baseDir}/scripts/moltbot-bot-flow.mjs bot --amount 0.001 --recipient 0xYourWallet... --pk 0xPRIVATE_KEY

See README.md in this folder for a short OpenClawBot-focused guide.

Core flow (Human-in-the-loop)

  1. Create invoice (platform key, Base/USDC, recipientAddress required)
  2. Send payUrl to the user (approval + payment)
  3. Poll invoice status until confirmed | expired | invalid | refunded

Core flow (Bot pays directly)

  1. Create invoice
  2. Get intent (approve/pay calldata)
  3. Send on-chain tx (approve if needed, then pay)
  4. Submit txHash
  5. Poll status

Important: Direct token transfer is invalid. Always use the Router steps.pay from /intent.


API Usage (HTTP)

1) Create invoice

Endpoint: POST /v1/invoices

Headers:

  • Authorization: Bearer <platform_key> (required if calling HTTP directly)
  • Content-Type: application/json
  • Idempotency-Key: pay_attempt_<uuid>

Body (Base/USDC fixed, recipientAddress required)

{
  "amount": "49.99",
  "recipientAddress": "0xYourWallet...",
  "ttlSeconds": 900,
  "metadata": { "botId": "openclawbot_123", "purpose": "checkout" }
}

Response includes invoiceId, payUrl, checkoutToken, expiresAt.

2) Get intent (bot-pay)

Endpoint: GET /v1/invoices/{invoiceId}/intent?chain=base&token=usdc

Headers (preferred):

  • X-Checkout-Token: <checkoutToken>

Response includes steps.approve, steps.pay, routerAddress, grossAmountAtomic.

3) Submit payment intent (txHash)

Endpoint: POST /v1/invoices/{invoiceId}/payment-intents

Headers:

  • X-Checkout-Token: <checkoutToken>
  • Content-Type: application/json

Body

{ "txHash": "0x...", "payerAddress": "0x..." }

4) Poll invoice status

Endpoint: GET /v1/invoices/{invoiceId}

Headers:

  • X-Checkout-Token: <checkoutToken>

Stop when: status is confirmed | expired | invalid | refunded.


Polling policy (safe default)

  • submitted right after tx: poll every 3-5s for 2 minutes
  • After 2 minutes: poll every 10-15s
  • Stop at expiresAt + grace (status will not change after that)
  • If you receive 429, backoff and retry later

Common mistakes

  • Missing recipientAddress with platform key (invalid)
  • Direct token transfer instead of Router pay
  • Losing checkoutToken (it is only returned on invoice creation)
README.md

paytrigo-openclawbot-skill

A minimal OpenClaw skill that lets OpenClawBots use PayTrigo on Base/USDC with no webhooks (polling only).

Install

Requires Node.js 18+.

npm install

Quickstart

1) Human-in-the-loop (user pays in browser)

node scripts/moltbot-human-flow.mjs human --amount 0.001 --recipient 0xYourWallet...
  • Open the printed payUrl in a browser and complete payment
  • The script polls until confirmed
node scripts/moltbot-bot-flow.mjs bot --amount 0.001 --recipient 0xYourWallet... --pk 0xPRIVATE_KEY
  • Sends approve + pay transactions
  • Submits txHash to PayTrigo
  • Polls until final status

Local wallet store (recommended)

This is the easiest way for an OpenClawBot to "remember" a wallet locally without external services.

1) Create a passphrase file (local only)

echo "use-a-strong-passphrase" > passphrase.txt
chmod 600 passphrase.txt

2) Create a wallet (optionally set it as recipient)

node scripts/moltbot-wallet-setup.mjs create --passphrase-file ./passphrase.txt --set-recipient-from-wallet

This creates .openclawbot/wallet.json, .openclawbot/wallet-address.txt, and .openclawbot/recipient.txt.

If you already have a wallet

You do not need to create a new one.

# Save an existing recipient address
node scripts/moltbot-wallet-setup.mjs recipient --address 0xYourWallet

# Import an existing private key into the encrypted wallet store
node scripts/moltbot-wallet-setup.mjs import --pk-file ./payer.pk --passphrase-file ./passphrase.txt --set-recipient-from-wallet

3) Run flows using the stored data

node scripts/moltbot-human-flow.mjs human --amount 0.001
node scripts/moltbot-bot-flow.mjs bot --amount 0.001 --passphrase-file ./passphrase.txt

Alternative: set a separate recipient address

node scripts/moltbot-wallet-setup.mjs recipient --address 0xYourWallet

Options

  • --ttl 900 : invoice TTL in seconds
  • --metadata '{"botId":"openclawbot_123"}' : metadata JSON
  • --poll 5 : polling interval (seconds)
  • --max-minutes 20 : max polling time (minutes)
  • --rpc https://mainnet.base.org : Base RPC endpoint
  • --skip-approve : skip approve if already approved
  • --store-dir .openclawbot : local store dir (default for recipient + wallet files)
  • --recipient-file ./recipient.txt : read recipient address from a file
  • --wallet-file ./wallet.json : encrypted wallet file for bot-pay
  • --passphrase-file ./passphrase.txt : decrypt wallet for bot-pay

Wallet / PK setup

Recipient wallet (required)

You must provide a recipient address (platform key requirement). You can pass --recipient or store it locally.

node scripts/moltbot-wallet-setup.mjs recipient --address 0xYourWallet
node scripts/moltbot-human-flow.mjs human --amount 0.001

Payer private key (optional; only for bot-pay)

Store locally and never commit it. Prefer encrypted wallet files instead of raw PKs.

node scripts/moltbot-bot-flow.mjs bot --amount 0.001 --pk 0xYOUR_PRIVATE_KEY

Success criteria

  • Final status becomes confirmed
  • USDC received in the recipient wallet

Notes

  • Platform key requires recipientAddress
  • Direct token transfers are invalid; always use Router pay (handled by scripts)
  • Never expose private keys

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install paytrigo-openclawbot?

Run openclaw add @paytrigo/paytrigo-openclawbot in your terminal. This installs paytrigo-openclawbot into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/paytrigo/paytrigo-openclawbot. Review commits and README documentation before installing.