Authentication
Request Body
Event name, must exactly match a Meter event name configured in the App. Maximum 100 characters.
Idempotency key to prevent duplicate charges. The same
idempotency_key will not be charged twice. Maximum 128 characters.Additional metadata as key-value pairs. Used to record extra business information without affecting billing.
Request Examples
Response
Normal Charge
Idempotent Replay
When the sameidempotency_key is submitted again, no duplicate charge occurs:
idempotent_replay: true indicates this was an idempotent replay and credits were not deducted again.
Idempotency Guarantees
- Prevents duplicate charges from network retries — when clients retry on timeout, the same idempotency key ensures only one charge
- Prevents duplicate charges from business logic — multiple calls for the same business operation will only charge once
- Idempotency window — the same
(app_uuid, idempotency_key)combination is permanently valid
How It Works
- Your App obtains user authorization through OAuth
- When the user uses a paid feature, call the Events API to report the event
- Profy looks up the corresponding credit price from the App’s Meter configuration
- Deducts the corresponding amount from the authorized user’s credits
- Returns the charge result and remaining balance
Daily Spending Cap
The platform sets a daily spending cap for each user per App. When the cap is reached, subsequent event reports will be rejected (HTTP 429). Refer to the real-time cap displayed in the product.Error Codes
Next Steps
Meter Configuration
Query App Meter configurations
Build a Profy App
Complete App development guide

