Skip to main content
POST
Ingest Event

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. Required unless externalSubject is provided.

data
object
required

Event payload containing the metering data.

externalSubject
string

Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, events may resolve to the previous customer for up to one hour. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9_-]+$
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.

externalId
string

Optional external identifier for cross-referencing with external systems. Alphanumeric characters, hyphens, and underscores only.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9_-]+$

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

Resolved customer ID. Absent when the event was reported with an externalSubject that does not match a customer yet.

externalSubject
string

The merchant's own customer identifier the event was reported with.

namespace
string
timestamp
string<date-time>
idempotencyKey
string
externalId
string

Optional external identifier for cross-referencing with external systems. Alphanumeric characters, hyphens, and underscores only.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9_-]+$