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
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 button
29 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 collect list-links
List this project's Collect links
codespar collect list-links| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links · parameters, responses and refusals
codespar collect create-links
Create a Collect link with its first draft
codespar collect create-links --input-file body.json{
"consumer_id": "csm_0000000000000000",
"valid_until": "2026-01-15T12:00:00.000Z",
"billing": "one_time",
"version": {
"title": "Example",
"description": "string",
"success_message": "string",
"items": [
{
"name": "Example",
"quantity": 0,
"unit_amount_minor": 1000
}
],
"brand": {
"logo_url": "https://example.com/hook",
"color": "string",
"text_color": "string",
"texts": {
"header": "string",
"footer": "string"
}
},
"surfaces": [
"page"
],
"due_in_days": 0,
"payer_fields": {
"contact": "optional",
"external_reference": "off"
},
"usdc_price": "string"
},
"payer": {
"name": "Example",
"contact": "string",
"external_reference": "string",
"document": "string",
"address": {
"publicArea": "string",
"number": "string",
"neighborhood": "string",
"city": "string",
"state": "string",
"postalCode": "string"
}
},
"reference": "string",
"reference_version": "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/collect/links · parameters, responses and refusals
codespar collect list-receivers-default
The project's default receiver for links that name none
codespar collect list-receivers-default| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/receivers/default · parameters, responses and refusals
codespar collect set-receivers-default
Configure (or clear) the project's default receiver
codespar collect set-receivers-default --input '{"consumer_id":"csm_0000000000000000"}'| 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 |
PUT /v1/collect/receivers/default · parameters, responses and refusals
codespar collect receivers
The consumers that could receive a Collect charge in this project
codespar collect receivers| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/receivers · parameters, responses and refusals
codespar collect links-stats
The project's Collect numbers over the last 30 days
codespar collect links-stats| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/stats · parameters, responses and refusals
codespar collect get-links
Read a Collect link
codespar collect get-links link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/{linkId} · parameters, responses and refusals
codespar collect update-links
Change a draft link's validity or receiving consumer
codespar collect update-links link_0000000000000000 --input '{"valid_until":"2026-01-15T12:00:00.000Z","consumer_id":"csm_0000000000000000"}'| argument | what it is |
|---|---|
<linkId> | 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/collect/links/{linkId} · parameters, responses and refusals
codespar collect links-draft
Replace the draft of a Collect link
codespar collect links-draft link_0000000000000000 --input-file body.json{
"title": "Example",
"description": "string",
"success_message": "string",
"items": [
{
"name": "Example",
"quantity": 0,
"unit_amount_minor": 1000
}
],
"brand": {
"logo_url": "https://example.com/hook",
"color": "string",
"text_color": "string",
"texts": {
"header": "string",
"footer": "string"
}
},
"surfaces": [
"page"
],
"due_in_days": 0,
"payer_fields": {
"contact": "optional",
"external_reference": "off"
},
"usdc_price": "string"
}| argument | what it is |
|---|---|
<linkId> | 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 |
PUT /v1/collect/links/{linkId}/draft · parameters, responses and refusals
codespar collect links-publish
Publish a Collect link
codespar collect links-publish link_0000000000000000 --input '{"confirm_usdc_price":"string"}'| argument | what it is |
|---|---|
<linkId> | 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/collect/links/{linkId}/publish · parameters, responses and refusals
codespar collect links-pause
Pause a Collect link
codespar collect links-pause link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/links/{linkId}/pause · parameters, responses and refusals
codespar collect links-resume
Resume a paused Collect link
codespar collect links-resume link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/links/{linkId}/resume · parameters, responses and refusals
codespar collect list-links-attempts
List a Collect link's attempts
codespar collect list-links-attempts link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/{linkId}/attempts · parameters, responses and refusals
codespar collect create-links-attempts
Issue a Pix attempt for the partner's channel
codespar collect create-links-attempts link_0000000000000000 --input '{"surface":"whatsapp","payer":{},"renew":false,"idempotency_key":"string"}'| argument | what it is |
|---|---|
<linkId> | 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/collect/links/{linkId}/attempts · parameters, responses and refusals
codespar collect list-attempts
List the project's Collect charges with their payments
codespar collect list-attempts| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/attempts · parameters, responses and refusals
codespar collect links-payments
List a Collect link's payments
codespar collect links-payments link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/{linkId}/payments · parameters, responses and refusals
codespar collect links-archive
Archive a Collect link
codespar collect links-archive link_0000000000000000 --input '{"subscriptions":"cancel"}'| argument | what it is |
|---|---|
<linkId> | 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/collect/links/{linkId}/archive · parameters, responses and refusals
codespar collect attempts-test-pay
Pay a Test attempt's charge from the shared Test payer (the payer button)
codespar collect attempts-test-pay attempt_0000000000000000| argument | what it is |
|---|---|
<attemptId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/attempts/{attemptId}/test-pay · parameters, responses and refusals
codespar collect attempts-artifact
The WhatsApp material of an attempt
codespar collect attempts-artifact attempt_0000000000000000| argument | what it is |
|---|---|
<attemptId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/attempts/{attemptId}/artifact · parameters, responses and refusals
codespar collect get
The hosted page's read of a Collect link (public)
codespar collect get link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/{linkId} · parameters, responses and refusals
codespar collect create-attempts
Ask a Collect link for a payable Pix (public)
codespar collect create-attempts link_0000000000000000 --input '{"page_session":"string","payer":{},"renew":false}'| argument | what it is |
|---|---|
<linkId> | 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/collect/{linkId}/attempts · parameters, responses and refusals
codespar collect links-refunds
The refund obligations of a link's exception payments
codespar collect links-refunds link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/{linkId}/refunds · parameters, responses and refusals
codespar collect payments-refund
Refund a late payment instead of keeping it
codespar collect payments-refund payment_0000000000000000| argument | what it is |
|---|---|
<paymentId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/payments/{paymentId}/refund · parameters, responses and refusals
codespar collect payments-honor
Keep a late payment instead of refunding it
codespar collect payments-honor payment_0000000000000000| argument | what it is |
|---|---|
<paymentId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/payments/{paymentId}/honor · parameters, responses and refusals
codespar collect links-subscriptions
The adhesions of a recurring offer
codespar collect links-subscriptions link_0000000000000000| argument | what it is |
|---|---|
<linkId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/links/{linkId}/subscriptions · parameters, responses and refusals
codespar collect get-subscriptions
One adhesion of a recurring offer
codespar collect get-subscriptions subscription_0000000000000000| argument | what it is |
|---|---|
<subscriptionId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
GET /v1/collect/subscriptions/{subscriptionId} · parameters, responses and refusals
codespar collect subscriptions-cancel
Cancel an adhesion commercially
codespar collect subscriptions-cancel subscription_0000000000000000 --input '{"reason":"customer_request"}'| argument | what it is |
|---|---|
<subscriptionId> | 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/collect/subscriptions/{subscriptionId}/cancel · parameters, responses and refusals
codespar collect subscriptions-test-pay
Pay a Test adhesion's first payment from the shared Test payer (Pagar (teste))
codespar collect subscriptions-test-pay subscription_0000000000000000| argument | what it is |
|---|---|
<subscriptionId> | String. |
| option | what it does |
|---|---|
-q, --query <key=value> | Query parameter (repeatable) (default: []) |
--timeout <ms> | Per-request timeout in milliseconds |
POST /v1/collect/subscriptions/{subscriptionId}/test-pay · parameters, responses and refusals
codespar collect create-subscriptions
A payer follows their adhesion to a recurring offer (public)
codespar collect create-subscriptions link_0000000000000000 subscription_0000000000000000 --input '{"page_session":"string"}'| argument | what it is |
|---|---|
<linkId> | String. |
<subscriptionId> | 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/collect/{linkId}/subscriptions/{subscriptionId} · parameters, responses and refusals