Get Verification Status
Query the current status of a payment verification.
The verification ID to query
curl https://facilitator.api.0xmeta.ai/v1/verifications/ver_abc123def456 \
-H "X-API-Key: your_api_key"
{
"id": "ver_abc123def456",
"type": "verification",
"status": "verified",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:15Z",
"transaction_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"chain": "base",
"details": {
"seller_address": "0x742d35cc6634c0532925a3b844bc9e7595f0beb0",
"expected_amount": "1000000000000000000",
"verified_amount": "1000000000000000000",
"metadata": {
"order_id": "ORDER-123"
}
}
}
Get Settlement Status
Query the current status of a payment settlement.
The settlement ID to query
curl https://facilitator.api.0xmeta.ai/v1/settlements/set_xyz789ghi012 \
-H "X-API-Key: your_api_key"
{
"id": "set_xyz789ghi012",
"type": "settlement",
"status": "settled",
"created_at": "2025-01-15T10:31:00Z",
"updated_at": "2025-01-15T10:35:00Z",
"transaction_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"details": {
"verification_id": "ver_abc123def456",
"destination_address": "0x742d35cc6634c0532925a3b844bc9e7595f0beb0",
"settled_amount": "1000000000000000000",
"metadata": {
"payout_id": "PAYOUT-789"
}
}
}
Status Values
Payment has been successfully verified
Verification or settlement is in progress
Funds have been successfully transferred
Operation failed (check error details)
Operation was rejected (invalid criteria)
Polling Best Practices
Don’t poll too frequently! Use webhooks instead for real-time updates.
If you must poll:
- Wait at least 5 seconds between requests
- Implement exponential backoff
- Set a maximum retry count
- Use webhooks for production
Example: Polling with Backoff
async function waitForSettlement(settlementId) {
const maxAttempts = 60;
const initialDelay = 5000;
for (let attempt = 0; attempt < maxAttempts; attempt++) {
const response = await fetch(
`https://facilitator.api.0xmeta.ai/v1/settlements/${settlementId}`,
{ headers: { "X-API-Key": "your_api_key" } }
);
const data = await response.json();
if (data.status === "settled" || data.status === "failed") {
return data;
}
// Exponential backoff: 5s, 10s, 20s, 40s, ...
const delay = initialDelay * Math.pow(2, Math.min(attempt, 5));
await new Promise((resolve) => setTimeout(resolve, delay));
}
throw new Error("Settlement timeout");
}
Use webhooks instead of polling for production applications. It’s more
efficient and provides instant updates.