New transaction for reconciliation purposes.
POST/transactions
Create a new Transaction that was initiated outside Impact Finance, for reconciliation purposes.
Note 1. Only settled transactions can be created this way. While an externally created transaction is still in a pending state, there is no need to update the state in Impact Finance. Likewise, failed externally created transactions can be ignored.
Note 2. When creating a transaction to or from a SharedSavings
account, the balance will automatically be updated. Unless toDreamId
or fromDreamId
is defined, a residual amount will appear outside any of the Impact Finance that reside on the shared account. The Impact Finance UX will handle this by creating further Internal transactions until the residual is 0. If running Impact Finance without UX ("headless"), it is up to you to decide how to resolve this residual amount. Either by creating Internal transactions automatically according to some algorithm, or by involving the user in the decision.
Note 3. When creating a transaction to or from a Performance
account, the previous note does not apply, as these accounts are dedicated to a single, uniquely defined Dream. However, the resulting performance balances such as balanceCents
, liquidBalanceCents
, etc. are not automatically updated, and must be adjusted with a separate call to PATCH /accounts/{id} for each affected Performance account.
Request
- application/json
Body
required
Transaction details
- transaction.DepositPostRequest
- transaction.WithdrawalPostRequest
- transaction.InternalPostRequest
transaction
object
oneOf
Possible values: [Deposit
]
Default value: Time of creation
Default value: Time of creation
Possible values: [Withdrawal
]
Default value: Time of creation
Default value: Time of creation
Possible values: [Internal
]
Default value: Time of creation
Default value: Time of creation
Responses
- 201
- 400
Transaction was created
- application/json
- Schema
- Example (from schema)
Schema
- transaction.Deposit
- transaction.Withdrawal
- transaction.Internal
transaction
object
oneOf
Possible values: [Deposit
]
user
object
required
Possible values: [requested
, settled
, failed
]
toAccount
object
required
toDream
object
Represents how much money (in cents or the smallest currency subunit) the User wants to save to complete this Dream.
(Optional) DateTime before which the User wants to complete this Dream.
Represents when the dream was completed
Current balance cents for dream
Represents when the dream was deleted
Current count of active savehacks
user
object
groupDream
object
(Optional) GroupDream this Dream is a part of.
account
object
Identifies the account where all money towards this dream is stored
dreamInspiration
object
nullable
(Optional) The Dream Inspiration this Dream was created from.
translatedName
object
Possible values: >= 1
and <= 9223372036854776000
Default value: 0
Possible values: [DreamInspiration
]
Possible values: [Withdrawal
]
user
object
required
Possible values: [requested
, settled
, failed
]
fromAccount
object
required
fromDream
object
Possible values: [Internal
]
user
object
required
Possible values: [requested
, settled
, failed
]
fromAccount
object
required
fromDream
object
toAccount
object
required
toDream
object
{}
Bad request
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
{
"errors": [
{
"field": "string",
"errors": [
"string"
]
}
]
}
{
"errors": [
{
"field": "transaction.amountCents",
"errors": [
"can't be negative"
]
}
]
}