Use HTTP payment challenges.
An advanced Playmos x402-shaped envelope over the transfer settlement core.
Choose this after the basic payment flow#
This service product is server-only: use your sk_test_ key, Base Sepolia and an enabled x402 settlement capability. Public pk_ keys and live/mainnet x402 are refused. Use IAP pay → verify for game purchases. This route is for HTTP services that deliberately integrate Playmos challenges. It is not a claim of interoperability with every stock x402 client or facilitator.
Local shape versus service challenge#
createPaymentRequirement and createX402Challenge build a local 402 response with a PAYMENT-REQUIRED header. They do not register a settleable challenge on the service. Use client.x402.challenge and fulfill, or client.x402.pay which performs that sequence.
Keep units explicit#
The SDK takes amount: '0.10'. The envelope’s maxAmountRequired is atomic USDC: '100000'. Network is key-selected Base Sepolia for test keys. Decode and validate challenge inputs; server-issued terms and fees are authoritative, not edits from the client.
Inspect the settlement result#
The result can remain pending or settling; only settled is terminal success, and failed is failure and the actual transaction hash. A locally constructed 402 body is not evidence that money moved. Persist a stable requirement ID before creating the challenge and retain the returned requirement to reconcile interrupted fulfillment with the same terms. A new ID creates a new operation.