1
transaction
Interitio edited this page 2025-06-18 19:33:50 +10:00

Transaction

Represents a monetary transaction for a particular user.

field type required description
transaction_id integer - UID for this transaction
user_id integer yes (Internal) id of the user making the transaction.
user User - User making the transaction.
amount integer yes Amount of currency added to the user's account. May be negative.
description string yes Description of this transaction.
reference string? no Optional reference string.
created_at timestamp - Timestamp at which this transaction was performed. Cannot be set or modified.
  • POST /transactions
    • Create and return a new Transaction.
    • Note that unlike other models containing a User, creation of a new User with a Transaction is not supported. Ensure the user exists before creating the transaction.
  • GET /transactions
    • Get all Transactions matching the given parameters.
    • Supported filter parameters:
      • transaction_id
      • user_id
      • description
      • reference
      • created_before
      • created_after
  • GET /transactions/{transaction_id}
    • Get the Transaction for the given transaction_id
  • PATCH /transactions/{transaction_id}
    • Not supported, Transactions are considered immutable.
  • DELETE /transactions/{transaction_id}
    • Not supported. Transactions cannot be individually deleted.
    • Note that if the User is deleted then the all their Transactions will also be deleted.
    • To reset or set a User's balance, submit a Transaction which changes it to the desired value.
  • * /transactions/{transaction_id}/user
    • Inherits all routes from /users/{user_id} with the associated user_id.