Usage charge events are available for prepaid and postpaid accounts. Prepaid accounts receive an
event after the charge is deducted from their credits.
Event types
Subscribing
In the Privy Dashboard, go to the Configuration > Webhooks page and select the events under Usage charges. All usage events require the wallet API to be enabled for the app, since usage arises from wallet action traffic.See the webhooks overview for registering an endpoint and
verifying payload signatures.
Payload
All three events share the same payload.The event type:
usage.gas_sponsorship.recorded, usage.swap_provider_fee.recorded, or
usage.ata_deposit.recorded.The wallet action ID for
wallet-action-transfer or wallet-action-swap, the transaction ID for
rpc, or the provider’s deposit ID for deposit-address. Use this to look up the operation and
reconcile the charge.The type of operation that incurred the charge.
rpc identifies gas sponsorship for a transaction
sent through the wallet RPC endpoint.The charge amount in USD, as a decimal string with six decimal places (e.g.
"0.004213"). A
charge smaller than a cent keeps its exact value rather than rounding, so charges total accurately
across a billing period.Examples
Reconciling charges
A sponsored cross-chain transfer or swap to Solana can report gas, swap provider fees, and an ATA deposit as separate events. These events carry the samesource_id, with different event types and event_id values.
Delivery is at least once, so the same event may arrive more than once. Use event_id to deduplicate charges and the svix-id header to identify a webhook redelivery.
See webhook delivery for the retry schedule.
API reference
Gas sponsorship charge recorded
Full schema for
usage.gas_sponsorship.recorded.Swap provider fee charge recorded
Full schema for
usage.swap_provider_fee.recorded.ATA deposit recorded
Full schema for
usage.ata_deposit.recorded.
