Create a new bank transaction
The bankAccount.id
is a required property. Before creating bank transaction, a bank account must exists. See POST /bankaccounts
When creating a bank transaction, the backend system loads the existing bank account record using bankAccount.id
. Information from the bank account is then appended to the bank transaction based on the transaction's direction type (inbound or outbound).
- For outbound transactions, the
fromBankAccount
field is automatically populated from the specified bank account. - For inbound transactions, the
toBankAccount
field is automatically populated from the specified bank account.
Note: When these fields are automatically set, any input provided in these properties will be ignored.
Body Required
Request Body for creating a new bank transaction
-
Unique identifier for the bank transaction supplied by the bank that manages the bank account. It must be globally unique across all bank accounts for the client. A duplication warning is returned if this is not the case.
-
Direction of the payment. "Inbound" stands for an incoming payment. E.g. a payment of an invoice by a customer. "Outbound" is a payment originating from this bank account. E.g a debet card transaction, when paid for goods and services.
Values are
inbound
oroutbound
. -
Details of the bank account involved in the transaction.
-
The payment reference must be one of the following types: text, ocr, invoiceRef.
text
: The value is a free text reference.ocr
: The value is an structured OCR reference. KID number in Norway.invoiceRef
: The value is an invoice number.
The actual value of the reference is set in the
value
property. -
Amount of the bank transaction.
-
Date of the transaction.
-
fromBankAccount object
The originating bank account for transactions. This is automatically set for outbound transactions, i.e. the property is always returned in the API responses for outbound transactions.
-
toBankAccount object
The receiving bank account for transactions. This is automatically set for inbound transactions, i.e. the property is always returned in the API responses for inbound transactions.
-
bankTransactionCode object
The bank transaction code is a structured code that identifies the type of a transaction. The code is structured in three levels: domain, family and subfamily.
- The domain code is the highest level and is used to group the transaction codes into different domains.
- The family code is used to group the transaction codes within a domain.
- The subfamily code is used to group the transaction codes within a family.
curl \
-X POST https://rest.api.24sevenoffice.com/v1/banktransactions \
-H "Content-Type: application/json" \
-H "Authorization: string" \
-d '{"bankTransactionReference":"10001-987-654-321","type":"outbound","bankAccount":{"id":"123-456-789"},"paymentReference":{"type":"text","value":"Payment for shipment AA-001."},"amount":{"value":1200,"currency":{"code":"NOK"}},"date":"2024-06-01","fromBankAccount":{"number":"123456789","type":"bban"},"toBankAccount":{"number":"987654321","type":"bban"},"bankTransactionCode":{"domainCode":"D001","familyCode":"F002","subFamilyCode":"SF003"}}'
# Headers
Authorization: string
# Payload
{
"bankTransactionReference": "10001-987-654-321",
"type": "outbound",
"bankAccount": {
"id": "123-456-789"
},
"paymentReference": {
"type": "text",
"value": "Payment for shipment AA-001."
},
"amount": {
"value": 1200,
"currency": {
"code": "NOK"
}
},
"date": "2024-06-01",
"fromBankAccount": {
"number": "123456789",
"type": "bban"
},
"toBankAccount": {
"number": "987654321",
"type": "bban"
},
"bankTransactionCode": {
"domainCode": "D001",
"familyCode": "F002",
"subFamilyCode": "SF003"
}
}
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string
# Payload
{
"bankTransactionReference": "10001-987-654-321",
"type": "outbound",
"bankAccount": {
"id": "123-456-789"
},
"paymentReference": {
"type": "text",
"value": "Payment for shipment AA-001."
},
"amount": {
"value": 1200,
"currency": {
"code": "NOK"
}
},
"date": "2024-06-01",
"fromBankAccount": {
"number": "123456789",
"type": "bban"
},
"toBankAccount": {
"number": "987654321",
"type": "bban"
},
"bankTransactionCode": {
"domainCode": "D001",
"familyCode": "F002",
"subFamilyCode": "SF003"
},
"status": "created",
"createdAt": "2024-06-01T18:00:00Z",
"modifiedAt": "2024-06-31T18:00:00Z"
}