codespar paywalls
Gate paywalls: create one in front of an API or MCP server, read it, change it, remove it, read its stats
Gate paywalls: create one in front of an API or MCP server, read it, change it, remove it, read its stats
6 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 paywalls list
List paywalls
codespar paywalls list| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/paywalls · parameters, responses and refusals
codespar paywalls create
Create a paywall
codespar paywalls create --input-file body.json{
"slug": "example",
"name": "Example",
"upstream_url": "https://example.com/hook",
"price": "string",
"currency": "BRL",
"consumer_id": "csm_0000000000000000",
"description": "string",
"category": "string",
"methods": [
"string"
],
"pricing_model": "string",
"pricing_tiers": [
{
"up_to": 0,
"price_atomic": "string"
}
],
"dynamic_price_url": "https://example.com/hook",
"metered_config": {
"basis": "string",
"base_atomic": "string",
"min_mult": 1,
"max_mult": 1,
"units_header": "string"
},
"payto": {
"kind": "byo",
"address": "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 |
POST /v1/paywalls · parameters, responses and refusals
codespar paywalls get
Read one paywall
codespar paywalls 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/paywalls/{id} · parameters, responses and refusals
codespar paywalls delete
Delete a paywall
codespar paywalls 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/paywalls/{id} · parameters, responses and refusals
codespar paywalls update
Update a paywall
codespar paywalls update obj_0000000000000000 --input '{"name":"Example","upstream_url":"https://example.com/hook","price":"string","active":true}'| 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/paywalls/{id} · parameters, responses and refusals
codespar paywalls stats
Earnings for one paywall
codespar paywalls stats 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/paywalls/{id}/stats · parameters, responses and refusals
codespar collect
Collect: links (draft, publish, pause, archive, stats), attempts and their WhatsApp material, payments and late-payment decisions, receivers, recurring offers and their adhesions, the Test payer butto
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