financial/transactions/create

Create a new transaction.

POST
https://api.elvanto.com/v1/financial/transactions/create.{json|xml|php}

Parameters

Name Type Description
batch array This array can contain the id of a batch, a number or name. Both a number and name can be used at the same time and if the number and/or name you provide does not match an existing batch, a new batch will be created with the details you provide. If this parameter is not supplied or empty, a new batch will be created.
person Required array This array can contain the id of a person or a firstname, lastname, email, mobile or phone. If you do not provide an id, the API will try match a person with the details you provide. A new person will be created if no match is found.
transaction_date Required date The date the transaction was made. E.g: 2024-12-30
transaction_datetime date The date and time the transaction was made. E.g: 2024-12-30T00:00:00+00:00
transaction_method string The method that the transaction was paid in.
Accepted Values: Cash, Check, Credit Card, Bank Transfer, Automatic Direct Debit and Online. Any other value will be treated as Other and placed in the "Method Name" field.
check_number string The check number. Will only be recognized if Check is the value of the transaction_method parameter.
amounts Required array An array of amounts that are included in the transaction. Each array needs to contain the following:

category_id: The ID of the category (Chart of Accounts).
total: The total amount.
tax_deductible: 1 if the payment is tax deductible. (optional)
memo: A memo to add to the amount. (optional)
external_notes: Notes from third party system used for record keeping. Once entered can not be edited. Useful for storing external transaction IDs or other debugging information. (optional)

If you do not include the tax_deductible parameter in your calls we will base this value off whether the Chart of Account has tax deductible payments turned on by default or not.
Expected request JSON HTTP POST
{
    "batch": {
        "id": "a491a41a-ad34-4845-b783-392cf0a409e7"
    },
    "person": {
        "id": "5045a36e-2650-4be4-932a-82d6aef8d53f"
    },
    "transaction_date": "2024-12-30",
    "transaction_method": "Check",
    "check_number": "12345678",
    "amounts": [
        {
            "category_id": "11249df5-62df-4a65-8a54-0f259437f2d9",
            "total": "100.00",
            "tax_deductible": 0,
            "memo": "Optional memo goes here.",
            "external_notes": "Optional External Notes go here."
        },
        {
            "category_id": "a491a41a-ad34-4845-b783-392cf0a409e7",
            "total": "5000.00",
            "tax_deductible": 1,
            "memo": "Optional memo goes here.",
            "external_notes": "Optional External Notes go here."
        }
    ]
}
Expected response JSON XML PHP
{
    "generated_in": "0.018",
    "status": "ok",
    "transaction": {
        "id": "647f531a-6093-4aec-a56f-4fa2962228e0",
        "batch": {
            "id": "a491a41a-ad34-4845-b783-392cf0a409e7",
            "number": 1002,
            "name": "Sunday 25th August"
        },
        "person": {
            "id": "5045a36e-2650-4be4-932a-82d6aef8d53f",
            "firstname": "John",
            "lastname": "Smith"
        }
    }
}
Error responses

Please see our response status codes documentation for details of potential error responses for any API request.

  • 250: Invalid Batch ID The Batch ID you provided does not exist.