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

NameTypeDescription
eventTypeSubscriberEventTypeRequired. Use SUBSCRIBER_PAYMENT or SUBSCRIBER_REFUND.
subscriberstringRequired. Subscriber email or id.
dataRecordRequired. Event payload. Typical keys: amount, currency.

Response Fields

FieldTypeDescription
idstringCreated event id.
eventTypeSubscriberEventTypeStored type.
dataRecordOptional stored payload.
subscriberIdstringOptional subscriber id.
organizationIdstringOptional organization id.
createdAtstringOptional ISO 8601 timestamp.

HTTP maps to { id, eventType }. data is that object. Failures return { data: null, error: { name, message, statusCode } }.