Skip to content

Payments SDK ​

@0xcurvy/payments-sdk is the TypeScript package shops and APIs use to accept Curvy payments. It is not the wallet SDK.

PackageAudienceWhat it does
@0xcurvy/curvy-sdkWallets and private-balance appsDeposit, aggregate, transfer, withdraw, recovery
@0xcurvy/payments-sdkMerchants and checkoutCreate signed payment requests, verify them, confirm payments on-chain

A payment is confirmed when on-chain evidence matches the payment reference for that checkout - not when a browser or facilitator returns a transaction hash alone.

Payment reference ​

Each payment request includes a fresh payment reference: ephemeralKeyX and ephemeralKeyY from the derived request. Store these values when you create the request; pass them to verifyPayment when confirming the shield.

Do not put your payment reference in the signed checkout package. Curvy confirms the reference on chain; you connect it back to your own commerce identifiers in your application.

Products that use this package ​

  1. Human checkout — customer pays on Curvy’s hosted payment page; your backend creates and signs the deposit request.
  2. Agent / x402 — shopper uses a standard x402 client; resource server uses Payments SDK against Curvy’s facilitator.

You do not need Curvy spending or viewing keys on the shop or API server. Public receiving keys plus (for checkout) a request signing key are enough to accept money.

Package layout ​

Entry pointRuntimeResponsibility
@0xcurvy/payments-sdkBrowser and NodeBrowser-safe convenience barrel
@0xcurvy/payments-sdk/intentBrowser and NodeParse, sign, and verify payment requests
@0xcurvy/payments-sdk/transportBrowser and NodeFragment encode/decode and checkout URLs
@0xcurvy/payments-sdk/chainBrowser and NodePortal prediction and payment verification
@0xcurvy/payments-sdk/contractsBrowser and NodePayment contract ABIs
@0xcurvy/payments-sdk/merchant/keysBrowser and NodeBuild and parse /.well-known/curvy-payments.json
@0xcurvy/payments-sdk/merchantNode onlyinitialize, createPaymentRequest

The request signing key and @0xcurvy/rs-core-wasm stay on the backend. Checkout pages import only the browser-safe entry points.

Documentation ​