Skip to main content
POST
/
v0
/
events
Ingest Event
curl --request POST \
  --url https://api.paygentic.io/v0/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "source": "<string>",
  "subject": "<string>",
  "data": {},
  "namespace": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "idempotencyKey": "<string>"
}
'
{
  "id": "<string>",
  "object": "event",
  "type": "<string>",
  "source": "<string>",
  "subject": "<string>",
  "namespace": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "idempotencyKey": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
type
string
required

CloudEvents type. Must match an eventType configured on a BillableMetric.

source
string
required

Event source URI identifying the application.

subject
string
required

Customer or entity ID this event relates to.

data
object
required

Event payload containing the metering data.

namespace
string

Organization/merchant ID. Defaults to the authenticated user's organization. Platform users can specify a different organization.

timestamp
string<date-time>

Event timestamp. Defaults to server time if not provided.

idempotencyKey
string

User-provided deduplication key. If not provided, a unique key is generated.

Response

Event accepted for processing

id
string

Server-generated event ID.

object
enum<string>
default:event
Available options:
event
type
string
source
string
subject
string
namespace
string
timestamp
string<date-time>
idempotencyKey
string