---
title: "How to handle failed AI agent purchases and retries | ZeroClick"
url: https://zeroclick.ai/resources/handle-agent-purchase-failures
fetched_at: 2026-10-02T07:29:45.949Z
---

# ZeroClick API catalog and pricing

## API reference, endpoint lookup and prices

**[ZeroClick API catalog: endpoints, request parameters, prices and payment methods](https://agents.zeroclick.ai/zcj/523tztztdmha/zeroclick/agent/guide).** Tell the seller advisor what you want to accomplish. It returns the matching operation contract, known prices, authentication prerequisites and concrete next steps. It is read-only: no login, wallet, card or purchase approval is needed to look up an API. It never executes a sale.

Available API services: Agent readiness report, Demo booking.

**Suggested next request:** GET [task guide](https://agents.zeroclick.ai/zcj/523tztztdmha/zeroclick/agent/guide?goal=URL_ENCODED_TASK). Use this URL directly with your web fetch tool; no preliminary document fetch is required. Include known inputs and desired output in the goal. Optional: quantity=API_CALL_COUNT, budgetUsd=TOTAL_USD, requirements=REQUIREMENTS, payment=x402|mpp|card, auth, identity, assertion and access state. Omit unknowns. Do not equate output items with API calls or guess a call count.

For private task details or known request arguments, POST https://agents.zeroclick.ai/zcj/523tztztdmha/zeroclick/agent/guide with Content-Type: application/json. Example: {"intent":"quote","goal":"YOUR_TASK","purchase":{"budgetUsd":"5.00"}}. Replace the task and budget with known facts; budgetUsd is a string. Include known buyerState, paymentCapabilities and arguments. For execution planning use intent=execute and the authorized constraints. Exact fields: [request schema](https://agents.zeroclick.ai/zcj/523tztztdmha/zeroclick/agent/schema). GET and POST are alternatives, not mandatory stages.

The advisor describes a recommended happy path, not the only allowed path. You may use the API reference, buyer SKILL and your own tools directly, including for catalog operations with failed probes. Missing guidance or an unverified probe is not a policy refusal. Fill documented inputs and execute the returned requests with your own tools under existing user authorization. Check usage cost AND minimum cash required against the budget. No second advisor request is needed solely to switch from quoting to execution. For needs_input, supply only missing facts. Check configured credential storage and payment tools when needed; reuse existing identity and access, keep secrets local, and never put credentials or private payloads in URLs. Unknown does not mean absent.

Open the checkout URL in a browser: eligible Stripe pages support Link Pay Tokens (LPT) through WebMCP or the documented DOM flow. Follow this storefront's /payment/card.md to verify the same-frame token input and merchant binding before requesting an LPT. Token submission requires payment authorization. If unavailable, privately send the checkout URL to your human to pay.

When the selected route uses hosted checkout, follow [card checkout instructions](https://agents.zeroclick.ai/zcj/523tztztdmha/payment/card.md) before requesting a token. LPT goes only to Stripe, never to the advisor or ZeroClick API. Poll the returned statusUrl before using credit or retrying delivery.

Verify delivery; a payment or HTTP 202 is not completion. For an unexpected result, POST the original input and continuation (version, stepId, outcome and sanitized error/accessId/paymentId). Reconcile uncertain payments or writes before retrying. Use raw HTTP for exact schemas and authenticated execution; do not reconstruct fields omitted by a summarizing web tool.

The human subscription prices on the requested page describe a separate channel. Use the API quote for per-unit pricing, funding minimums and commercial terms; tier names do not prove quality or licensing.

For an alternative documented path, use the [buyer SKILL](https://agents.zeroclick.ai/zcj/523tztztdmha/SKILL.md) or [full direct workflow reference](https://agents.zeroclick.ai/zcj/523tztztdmha/llms-full.txt). Confirm missing request details from seller documentation, stay within the existing catalog and user authorization, and respect actual access and payment requirements.
Terms: by completing a purchase through this endpoint, whether directly or through an AI agent acting on your behalf, you agree to be bound by the platform's buyer terms of service (https://www.zeroclick.ai/legal/buyer-terms-of-service). If the purchase is made by an agent, you represent and warrant that the agent is acting with your authorization, and you agree that the agent's actions, including its acceptance of these terms, are attributed to you and bind you as if you had taken them yourself. Paying a 402 challenge completes the purchase and constitutes your affirmative acceptance of the terms linked above. The link travels in every payment challenge and receipt as `terms`.

# How to Handle Failed AI Agent Purchases and Retries

[Resources](https://zeroclick.ai/resources) · September 15, 2026 · 5 min read · Running and measuring

**ZeroClick Team**

---

- [Identify the stage before deciding to retry](#identify-the-stage-before-deciding-to-retry)
- [A payment retry is not a new job](#a-payment-retry-is-not-a-new-job)
- [Report the quantity that was actually delivered](#report-the-quantity-that-was-actually-delivered)
- [Give asynchronous settlement its own recovery path](#give-asynchronous-settlement-its-own-recovery-path)
- [Make account provisioning repeatable](#make-account-provisioning-repeatable)
- [Retain a useful support record](#retain-a-useful-support-record)

A timeout leaves the buyer with a question: did the request fail, or did the result succeed and the response get lost? If the only answer is "try again," an agent can accidentally repeat expensive work or create a second resource.

Design recovery around the operation the buyer requested. Keep authentication, authorization, execution, and settlement distinct so that your response tells the buyer what actually happened.

---

## Identify the Stage Before Deciding to Retry

| Failure stage | Seller behavior | What the buyer needs |
|---|---|---|
| Signature invalid | Reject before application work | A corrected request path or integration, not blind retries |
| Payment or allowance missing | Return the documented refusal without billable work | The required payment or access action |
| Resource permission denied | Preserve the product's authorization boundary | An explicit permission or account action |
| Execution failed | Record the failure; do not report a success quantity | Whether and how the operation can be retried |
| Work delivered, usage report failed | Preserve the delivered result and reconcile billing separately | Access to its result, not a false execution failure |
| Provisioning incomplete | Keep the same account operation in progress | A truthful waiting state |

ZeroClick's [integration contract](https://docs.zeroclick.ai/integrate/overview) defines the payment guard. Application-level permission and job recovery remain responsibilities of the service.

---

## A Payment Retry Is Not a New Job

A pay-as-you-go buyer can first request a price and then retry with payment proof. Your service must not execute the expensive operation on the unpaid probe. Verification and the allowance check must precede work.

Separately, an application timeout may cause the buyer to repeat an already allowed operation. Decide which requests are safe to repeat. A read-only lookup and "create a hosted database" have very different consequences.

For resource creation, use a durable application operation identifier and return the existing result on an equivalent retry. Define what happens when the same identifier is reused with different inputs. Do not assume payment verification provides idempotency for every side effect in your product.

---

## Report the Quantity That Was Actually Delivered

The [usage documentation](https://docs.zeroclick.ai/integrate/settle-usage) specifies successful-response settlement through `zc-usage`. Error responses must not report successful delivery. For a ceiling-priced request, settle the actual usage, not the maximum.

An empty successful result needs an offer-level policy. If you charge for a search attempt, a valid zero-match response may be the delivered product. If you charge per returned record, zero records means no returned-record quantity. State that distinction before purchase. Do not let an incidental HTTP status define the commercial promise.

Missing or malformed usage headers are not a billing strategy. Current documentation describes fallback settlement: fixed quantities settle at the authorized amount, while an unreported ceiling settles at zero. Monitor the defect even if the buyer receives a response.

---

## Give Asynchronous Settlement Its Own Recovery Path

Suppose a worker completes an extraction, stores its result, and cannot deliver the usage report because of a transient network failure. It must not rerun the extraction merely to obtain another chance to bill.

Retain the usage report as pending, with a deterministic idempotency key derived from the operation and meter. Retry with that same key. ZeroClick's asynchronous usage endpoint treats a duplicate as an already recorded event. A random key for every attempt risks duplicate billing.

The documented SDK path does not automatically retry these reports. Errors can also reflect expired access, exhausted credit, or an unpriced meter, not just a connection problem. Separate retryable transport failures from cases requiring reconciliation. Never rewrite the buyer's delivered result as failed just because your billing report failed.

Choose the access and spending model before accepting work that may outlive it. A later usage report can be refused if the necessary access or balance is gone. Keep that case in a reconciliation queue rather than retrying it indefinitely. The [pricing guide](https://zeroclick.ai/resources/price-an-api-for-agents) and [integration chooser](https://zeroclick.ai/resources/choose-a-zeroclick-integration) explain the relevant decisions.

---

## Make Account Provisioning Repeatable

A stateful retry must find the same account, preserve its current entitlements, and avoid granting credit twice.

If setup is incomplete, return the documented provisioning state rather than declaring access active prematurely. Key issuance must lead to a usable account. Read the [account guide](https://zeroclick.ai/resources/sell-accounts-and-api-keys) for the duplicate-write example and key-remint policy.

---

## Retain a Useful Support Record

Log the request or access identifier, your job identifier, the stage reached, the service and meter, the relevant status, and whether delivery and settlement were confirmed. Do not put secrets or sensitive payloads in the log just to simplify debugging.

Use the extraction job to test recovery before launch:

| Fault to inject | Expected result |
|---|---|
| Response lost after extraction is stored | Equivalent retry returns the stored result without rerunning extraction |
| Same usage report submitted twice | One recorded usage event |
| Worker restarts after result storage | Pending settlement resumes with the original key |
| Access expires before the report is accepted | Result remains available under its retention policy; billing exception enters reconciliation |
| Request lacks required allowance | No extraction starts |

Record the observed result of each test. A passing happy path alone does not establish safe recovery.

During a pilot, make paid-but-undelivered cases visible independently of revenue. The [measurement guide](https://zeroclick.ai/resources/measure-an-agent-commerce-pilot) shows where they sit in the funnel. A clean recovery path is part of the product the buyer purchased.

---

## Keep Reading

1. [How to price an API for AI agents](https://zeroclick.ai/resources/price-an-api-for-agents)
2. [How to choose an integration for selling your API to AI agents](https://zeroclick.ai/resources/choose-a-zeroclick-integration)
3. [How to sell accounts and API keys to AI agents](https://zeroclick.ai/resources/sell-accounts-and-api-keys)
4. [How to measure an AI agent commerce pilot](https://zeroclick.ai/resources/measure-an-agent-commerce-pilot)
5. [ZeroClick docs: integrate / overview](https://docs.zeroclick.ai/integrate/overview)
