Core client
createClient(config)
createApiClient(options)
Network and config
sdk.networks.listSupported()
sdk.networks.resolve(ref)
sdk.networks.toCaip2(ref)
sdk.networks.toChainId(ref)
Intents and payment execution
sdk.intents.create(params)
sdk.intents.build(request)
sdk.payments.canPay(params)
sdk.payments.sendRouterPayment(params)
sdk.payments.payWithPermit2(params)
sdk.payments.payWithEIP2612(params)
sdk.payments.payWithEIP3009(params)
x402
sdk.x402.buildRoute(input)
sdk.x402.buildResponse(input)
sdk.x402.getSchemeId(scheme)
sdk.x402.decodePaymentSettledEvent(log)
sdk.x402.createResourceServer(options)
sdk.x402.createPaymentClient(options)
sdk.x402.wrapFetchWithPayment(options)
sdk.x402.wrapAxiosWithPayment(options)
createFastifyPaymentMiddleware(server, routes?) from @pepay/x402flex/fastify
Sessions
sdk.sessions.buildSessionContext(input)
sdk.sessions.buildSessionGrantTypedData(input, domain)
sdk.sessions.buildClaimableSessionGrantTypedData(input, domain)
sdk.sessions.buildClaimSessionTypedData(input, domain)
sdk.sessions.auditSessionReceipts(events, sessionId)
sdk.sessions.list(...)
sdk.sessions.get(...)
sdk.sessions.spends(...)
sdk.sessions.payments(...)
Subscriptions
sdk.subscriptions.buildCreateTypedData(request, domain)
sdk.subscriptions.buildCreateDigest(request, domain)
sdk.subscriptions.buildCancelTypedData(request, domain)
sdk.subscriptions.buildCancelDigest(request, domain)
sdk.subscriptions.createWithSig(request, network?)
sdk.subscriptions.charge(subId, network?)
sdk.subscriptions.cancel(subId, deadline, signature?, network?)
sdk.subscriptions.get(subId, network?)
sdk.subscriptions.isDue(subId, network?)
sdk.subscriptions.computeId(request, network?)
Relay and invoices
sdk.relay.payment(payload)
sdk.relay.permit2Bundle(payload)
sdk.relay.sessionOpen(payload)
sdk.relay.sessionOpenClaimable(payload)
sdk.relay.sessionClaim(payload)
sdk.relay.sessionRevoke(payload)
sdk.invoices.create(payload)
sdk.invoices.get(invoiceId)
sdk.invoices.status(invoiceId)
sdk.invoices.cancel(invoiceId)
sdk.invoices.confirmPayment(invoiceId, payload)
Low-level helpers
createFlexIntent
buildFlexResponse
hashPaymentIntent
hashFlexWitness
derivePaymentId
deriveResourceId
deriveEip3009Nonce
formatSessionReference
parseSessionReference