What is 402 challenge?

A 402 challenge is the signed JSON a server returns with an HTTP 402 response. It states the price, the accepted payment details, and a one-time nonce, so the caller knows exactly what to pay and how to prove it on retry.

The challenge is signed so the client can trust it came from the expected party and wasn’t tampered with in transit. The nonce ties a specific payment to a specific request.

In Paywall, the challenge is produced by the platform and relayed by a thin SDK or edge Worker — your application code never has to construct or verify it by hand.