codespar payment-links
Payment links: the shareable URL an agent pays over x402/USDC and a person pays via Pix; list, create, read, change, remove, payments, stats
Payment links: the shareable URL an agent pays over x402/USDC and a person pays via Pix; list, create, read, change, remove, payments, stats
7 commands in @codespar/cli 0.20.0.
Each one prints what its operation answered. What a command prints has the rule, and Configuration has the exit codes and the shape of a failure.
codespar payment-links list
List the payment links in this project
codespar payment-links list| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/payment-links · parameters, responses and refusals
codespar payment-links create
Create a multi-rail payment link
codespar payment-links create --input-file body.json{
"slug": "example",
"title": "Example",
"description": "string",
"accepts": [
{
"rail": "x402",
"amount": "1000",
"currency": "USDC",
"pay_to": {
"kind": "byo",
"address": "string",
"consumer_id": "csm_0000000000000000"
}
}
],
"one_time": true,
"max_uses": 1,
"expires_at": "2026-01-15T12:00:00.000Z",
"redirect_url": "https://example.com/hook",
"metadata": {}
}| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
-i, --input <json> | Request body as a JSON string |
-f, --input-file <path> | Request body from a JSON file |
POST /v1/payment-links · parameters, responses and refusals
codespar payment-links stats
Collect totals for this project's payment links
codespar payment-links stats| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/payment-links/stats · parameters, responses and refusals
codespar payment-links payments
The payments one payment link received
codespar payment-links payments obj_0000000000000000| argument | what it is |
|---|---|
<id> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/payment-links/{id}/payments · parameters, responses and refusals
codespar payment-links get
Read one payment link
codespar payment-links get obj_0000000000000000| argument | what it is |
|---|---|
<id> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/payment-links/{id} · parameters, responses and refusals
codespar payment-links delete
Delete a payment link
codespar payment-links delete obj_0000000000000000| argument | what it is |
|---|---|
<id> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
DELETE /v1/payment-links/{id} · parameters, responses and refusals
codespar payment-links update
Update a payment link's title, copy, expiry, redirect or active flag
codespar payment-links update obj_0000000000000000 --input '{"title":"Example","description":"string","active":true,"expires_at":"2026-01-15T12:00:00.000Z","redirect_url":"https://example.com/hook"}'| argument | what it is |
|---|---|
<id> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
-i, --input <json> | Request body as a JSON string |
-f, --input-file <path> | Request body from a JSON file |
PATCH /v1/payment-links/{id} · parameters, responses and refusals