Skip to content

docs(x402): clarify the payment signature is reusable until balance runs out#2618

Merged
MQ37 merged 3 commits into
masterfrom
docs/x402-reuse-signature
Jun 12, 2026
Merged

docs(x402): clarify the payment signature is reusable until balance runs out#2618
MQ37 merged 3 commits into
masterfrom
docs/x402-reuse-signature

Conversation

@MQ37

@MQ37 MQ37 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Context

The x402 page doesn't state that the signed PAYMENT-SIGNATURE can be reused across calls. A reader following the direct-API steps may assume each call needs a fresh signature and a new on-chain settlement.

Solution

  • Add a :::note in the direct-API section: the same PAYMENT-SIGNATURE stays valid while the prepaid balance lasts; resend it on every call with no re-signing or new settlement, and only sign again when the API returns 402 (balance exhausted) — the manual equivalent of what mcpc does automatically on the MCP path.
  • Tighten the prepaid-balance bullet to say subsequent calls reuse the same signature.

@MQ37 MQ37 requested a review from marcel-rbro as a code owner June 4, 2026 13:36
@github-actions github-actions Bot added the t-ai Issues owned by the AI team. label Jun 4, 2026
@apify-service-account

apify-service-account commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🗑️ Preview for this PR was deleted.


:::note Reuse the same signature

The signed `PAYMENT-SIGNATURE` stays valid while your prepaid balance lasts. Send it with every subsequent request - each call draws from the balance with no new signing and no new on-chain settlement. When the balance is exhausted, the API responds with `402` again; repeat step 2 to sign a fresh payment and continue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeat step 2 to sign a fresh payment and continue

I'd specify what you need to do: "Sign the payment again to continue."

Also, consider moving the entire note to the How it works section instead of the example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6d9e0d9 — moved the note up into the direct-API How it works section and reworded the last sentence to "sign the payment again to continue."

@MQ37 MQ37 requested a review from marcel-rbro June 11, 2026 11:02

@marcel-rbro marcel-rbro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@MQ37 MQ37 merged commit 5db51ea into master Jun 12, 2026
16 checks passed
@MQ37 MQ37 deleted the docs/x402-reuse-signature branch June 12, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants