Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body

application/json

The transaction to create.

A transaction to create on an account.

operationId
string
required

Your unique id for this operation, at most 128 characters. Send the same id only when you repeat the same request: it makes the call idempotent. One id stands for one transaction and cannot be used for another.

Required string length: 1 - 128
transactionType
string
required

The name of a transaction type of your environment, such as a bonus type Lobyco configured for you. Payment and Refund are not accepted here.

Minimum string length: 1
toAccountId
integer<int64> | null

The id of the account the transaction is booked on: bonus is added to it for a positive amount and taken off it for a negative one. Required unless the deprecated accountExternalId is sent.

fromAccountId
integer<int64> | null

The id of the account the bonus is moved from, to move bonus between two accounts. Left out, the bonus is not taken from another account.

accountExternalId
string | null
deprecated

Deprecated. Use toAccountId. The external id of the account the transaction is booked on, read only when toAccountId is left out. At most 60 characters.

Maximum string length: 60
amount
number<double> | null

The amount of bonus: positive to add it to the account in toAccountId, negative to take it off. Not zero, and with at most two decimals. Can be left out only with fromAccountId, to move everything that account has available.

metadata
object | null

Key-value pairs to keep with the transaction, at most 1024 characters as JSON. Lobyco reads storeId, chainId and receiptId from them for statements, and details as a note shown to the customer.

instantCapture
boolean | null
default:true

true books the amount at once. false reserves it, and the transaction waits to be captured or cancelled. Default true.

expirationDate
string<date-time> | null

When the bonus added by this transaction expires. Left out, the transaction sets no expiry date.

autoCaptureDate
string<date-time> | null

When Lobyco captures the transaction by itself. Only with instantCapture set to false. Omitted, the transaction waits until you capture or cancel it.

Response

The transaction was created, or an earlier call with the same operationId had created it already. amount is what was booked.

The transaction that was created.

transactionId
integer<int64>
required

The id of the transaction. The capture, cancel and refund calls take it.

Example:

9154290

amount
number<double>
required

The amount that was booked or reserved, without sign. Less than the amount asked for when the maximum balance of the account type cut it down.

Example:

150

Last modified on November 16, 2026