Creates a usage event. The idempotencyKey is used to ensure the event is processed only once by downstream consumers, even if the same event is submitted multiple times. Duplicate submissions will be accepted and return the same response.
API key authentication
Customer identifier that generated this consumption event. Sample values: 'cus_abc123xyz', 'cus_789def456'
Unique deduplication key preventing duplicate event processing. Sample values: 'usg_2024_01_15_abc123', 'event_wallet_xyz789', 'consumption_ref_456def'
Merchant organization identifier owning this consumption event. Sample values: 'org_abc123xyz', 'org_789def456'
Actual occurrence timestamp for the consumption event in ISO 8601 format. Sample values: '2024-01-15T10:30:00Z', '2024-02-01T14:45:30Z'. Represents when the event occurred, not when Paygentic received it.
Commitment identifier for this consumption event. Sample values: 'com_abc123xyz', 'com_789def456'
Custom key-value attributes providing context about the consumption event. Sample values: {"model_name": "claude-3-opus", "input_tokens": "1500", "output_tokens": "800"} or {"storage_tier": "premium", "data_center": "eu-west-1", "encryption": "enabled"} or {"image_resolution": "1024x1024", "generation_model": "stable-diffusion-xl"}
Usage event created successfully
Unique identifier for a usage event
usageEvent Billing information for the usage event when it has been billed. This object is populated by the server and returned in GET and PATCH responses. It cannot be set directly in request bodies.
Readable summary explaining what triggered this consumption event. Sample values: 'Claude language model text generation', 'Customer data warehouse storage allocation', 'DALL-E image creation batch job', 'GPT-4 fine-tuning compute session', 'Vector database query operations'
Commitment identifier used for this consumption event. Sample values: 'com_abc123xyz', 'com_789def456'
Refund information for the usage event when it has been refunded. This object is populated by the server and returned in GET and PATCH responses. It cannot be set directly in request bodies.