Overview
The/verify endpoint confirms that a payment has been authorized and is valid. Servers should call this endpoint before delivering services to ensure payment has been received.
Endpoint
When to Use
- Before delivering services - Always verify payment first
- Payment validation - Confirm transaction authenticity
- Authorization checks - Ensure payment meets requirements
Request
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
proof | string | Payment authorization proof | Yes |
network | string | Blockchain network | Yes |
txHash | string | Transaction hash (optional) | No |
Example Request
Response
Success Response
Invalid Payment Response
Response Fields
| Field | Type | Description |
|---|---|---|
valid | boolean | Whether payment is valid |
transactionId | string | Unique transaction identifier |
amount | string | Payment amount in USDC |
network | string | Blockchain network used |
timestamp | number | Unix timestamp of payment |
status | string | Payment status |
error | string | Error message (if invalid) |
code | string | Error code (if invalid) |
Error Codes
| Code | Description |
|---|---|
PAYMENT_NOT_FOUND | Payment proof not recognized |
INSUFFICIENT_AMOUNT | Payment amount too low |
EXPIRED | Payment authorization expired |
INVALID_NETWORK | Network not supported |
ALREADY_USED | Payment already redeemed |
Complete Integration Example
Best Practices
- Always verify before delivery - Never trust client-side payment claims
- Cache verification results - Avoid redundant API calls
- Set timeouts - Don’t let verification hang
- Log all attempts - Track payment attempts for debugging
- Handle errors gracefully - Provide clear feedback
Caching Verifications
Rate Limiting
- 500 requests per minute per IP
- Use caching to reduce API calls
- Exceeding limits returns
429 Too Many Requests
Related Endpoints
- /settle - Finalize transaction settlement
- /open - Production payment endpoint
- /test - Development endpoint
- /supported - Check supported networks
