Packages
@vanta/client
Client SDK for handling 402 responses and payments
@vanta/middleware
Server middleware for payment verification
@vanta/sdk
Core types, utilities, and shared functionality
HTTP API
Standard headers used in the x402 protocol:
Request Headers
| Header | Description |
|---|---|
Authorization | Payment proof (x402 scheme) |
X-Vanta-Token | Access token for authenticated requests |
Response Headers
| Header | Description |
|---|---|
WWW-Authenticate | Payment challenge (402 responses) |
X-Vanta-Token | Issued access token |
X-Vanta-Receipt | Payment receipt |
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success - payment verified or valid token |
402 | Payment Required - challenge issued |
401 | Unauthorized - invalid token or signature |
403 | Forbidden - payment verification failed |