Create new transaction

Creates new transaction and returns information

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

pidstringRequiredformat: "uuid"
Loyalty Program Id

Request

Transaction Payload
amountdoubleRequired

Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided).

balanceDefinitionIdstringRequiredformat: "uuid"

Unique identifier (UUID) of the associated balance definition.

transactionTypeenumOptional

Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit).

Allowed values:
contactIdlongOptional>=1

Unique identifier of the contact involved in the transaction. Required unless LoyaltySubscriptionId is provided.

LoyaltySubscriptionIdstringOptional

Unique identifier for the loyalty subscription. Required unless contactId is provided.

metamap from strings to anyOptional
Optional metadata associated with the transaction.
ttlintegerOptional>=10

Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided.

eventTimedatetimeOptional

Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format).

autoCompletebooleanOptional
Whether the transaction should be automatically completed.
balanceExpiryInMinutesintegerOptional>=1
Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true.

Response

Transaction created successfully
idstringOptionalformat: "uuid"

Unique identifier (UUID) of the transaction.

amountfloatOptional
The transaction amount.
transactionTypeenumOptional
The type of the transaction.
metamap from strings to anyOptional
Optional metadata associated with the transaction.
statusenumOptional
The current status of the transaction.
loyaltyProgramIdstringOptionalformat: "uuid"

Unique identifier (UUID) of the associated loyalty program.

balanceDefinitionIdstringOptionalformat: "uuid"

Unique identifier (UUID) of the associated balance definition.

contactIdlongOptional
Unique identifier of the contact associated with the transaction.
eventTimedatetimeOptional

Optional timestamp indicating when the transaction event occurred (ISO 8601 format).

rejectReasonstringOptional

Reason for rejection if the transaction was declined (nullable).

rejectedAtdatetimeOptional

Timestamp when the transaction was rejected (nullable).

expirationDatedatetimeOptional

Expiry date of the transaction (nullable).

completedAtdatetimeOptional

Timestamp when the transaction was completed (nullable).

cancelledAtdatetimeOptional

Timestamp when the transaction was canceled (nullable).

createdAtdatetimeOptional
Timestamp when the transaction was created.
updatedAtdatetimeOptional
Timestamp when the transaction was last updated.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error