Skip to main content
WEBHOOK
paywall.usage.charge.created
{
  "id": "paywall_usage_charge_created_evt_123",
  "paywallId": "pw_live_123",
  "ownerUserId": "usr_owner_789",
  "type": "paywall.usage.charge.created",
  "version": "2024-05-01",
  "createdAt": "2024-05-01T12:34:56Z",
  "status": "pending",
  "attempts": 1,
  "data": {
    "paywallId": "pw_live_123",
    "ownerUserId": "usr_owner_789",
    "walletUserId": "wallet_123",
    "activityId": "act_usage_001",
    "model": "gpt-4-turbo",
    "promptTokens": 1200,
    "completionTokens": 850,
    "cost": 0.018
  }
}

Body

application/json

Paywall event payload that triggered the webhook delivery.

id
string
required
paywallId
string
required
type
enum<string>
required

Event key (see the webhooks section for the full catalog).

Available options:
TitleConst
paywall.usage.charge.created
version
string
required
createdAt
string<date-time>
required
status
string
required
attempts
integer
required
data
object
required

Event-specific payload delivered with the webhook. Structure depends on the event type. Payload fields: paywallId, ownerUserId, walletUserId, activityId, model, promptTokens, completionTokens, cost.

ownerUserId
string
metadata
object
trigger
object
subject
object

Response

200

Return a 2xx to acknowledge receipt.