TypeScript SDKs
Pick the payer, receiver, or merchant package without crossing trust boundaries.
The SDKs are separated by role so wallet signing, receiver operations, and merchant backend credentials do not drift into the same client.
| Package | Runtime | Key boundary |
|---|---|---|
x402-paysdk/pay | Browser, app, wallet host | Uses a host-provided signer; never receives private keys. |
x402-paysdk/receive | Receiver app or trusted tool | Creates and manages refs; does not sign payer payments. |
x402-paysdk/merchant | Merchant backend | Holds merchant API/notify credentials; must not run in an untrusted browser. |
| Internal protocol core | Bundled, not imported directly | Protocol parsing, encoding, validation, offers, signatures, and bounded HTTP helpers. |
Start with only the package that matches the current trust domain. A checkout frontend normally uses pay-sdk; its backend uses merchant-sdk.