Skip to main content

Execute Paid API Action

Executes a server-priced metered non-order API action under strict purchase rate limits, spend caps, fraud detection, and atomic balance deduction (referenceType: "API_ACTION").

Supported Metered Actions​

actionTypeServer Cost (USDT)Description
BULK_CATALOG_EXPORT0.500000Returns up to 100 active catalog products in a compact export structure.
STOCK_RESERVATION_PING0.100000Returns active catalog product count and live server timestamp.
POST/api/v1/actions
Target: https://api.example.com
curl -sS -X POST "https://api.example.com/api/v1/actions" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"actionType": "STOCK_RESERVATION_PING",
"idempotencyKey": "action-ping-0001",
"metadata": {
"source": "sync-worker"
}
}'

Request Body (application/json)​

FieldTypeRequiredDescription
actionTypeenumYes"BULK_CATALOG_EXPORT" or "STOCK_RESERVATION_PING".
idempotencyKeystringYes8–128 chars, automatically scoped per user account (userId:idempotencyKey).
metadataobjectNoFlat key-value map (string | number | boolean).

Success Response (201 Created / 200 OK Replay)​

{
"actionType": "STOCK_RESERVATION_PING",
"amountCharged": "0.100000",
"balanceAfter": "99.900000",
"ledgerTransactionId": "cld_action_001",
"created": true,
"result": {
"activeProductCount": 3,
"checkedAt": "2026-11-30T18:10:05.000Z"
}
}

Error Responses​

Follows the exact same error taxonomy as POST /api/v1/purchases (400, 401, 402 INSUFFICIENT_BALANCE, 403 API_KEY_CAP_EXCEEDED, 403 FRAUD_DETECTED, 429 RATE_LIMITED, 500 INTERNAL_ERROR).