lumail.events.create
SDK 2.1.0 · API v2 · POST /api/v2/events
MethodPOST
/api/v2/events[email protected] · lumail.events
events.create(params: CreateEventParams): Promise<LumailResult<CreateEventResponse>>eventType is SUBSCRIBER_PAYMENT or SUBSCRIBER_REFUND. subscriber is an email or id.
Body Parameters
| Name | Type | Description |
|---|---|---|
eventType | SubscriberEventType | Required. Use SUBSCRIBER_PAYMENT or SUBSCRIBER_REFUND. |
subscriber | string | Required. Subscriber email or id. |
data | Record | Required. Event payload. Typical keys: amount, currency. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Created event id. |
eventType | SubscriberEventType | Stored type. |
data | Record | Optional stored payload. |
subscriberId | string | Optional subscriber id. |
organizationId | string | Optional organization id. |
createdAt | string | Optional ISO 8601 timestamp. |
HTTP maps to { id, eventType }. data is that object. Failures return { data: null, error: { name, message, statusCode } }.