Skip to content

x402 and the Payments SDK ​

On the exact x402 rail, roles split like this:

RoleResponsibilityPackage
Shopper (agent)Answers HTTP 402 with EIP-3009 / PAYMENT-SIGNATUREStandard @x402/* client (not Payments SDK)
Resource serverIssues challenges, talks to Curvy’s facilitator, confirms shield evidence@0xcurvy/payments-sdk + @0xcurvy/x402-protocol
FacilitatorVerify, settle, submit shieldCurvy proprietary service

Copyable merchant reference in this monorepo: packages/merchant/merchant-x402-exact. Human-checkout helpers (signPaymentIntent, buildCheckoutUrl, …) are not part of this rail — see Human checkout.

Tests ​

  • Unit (mocked chain, Payments SDK only): pnpm --filter @0xcurvy/payments-sdk test — includes x402-merchant cases for challenge note derivation, facilitator-recovery portal prediction, and shield confirmation.
  • E2E (Anvil + facilitator + merchant-x402-exact + shopper driver): pnpm demo:payments:x402-merchant-e2e (documented under packages/demo/TESTING.md).
  • Confirming payments — verifyPayment and payment references
  • API surface — all Payments SDK entry points
  • @0xcurvy/x402-protocol — x402 wire types (not part of this package)