Transactions

Create, store, and link transactions with structured metadata for expense reconciliation.

Overview

A transaction represents an expense event — for example, a card payment, bank transfer, or cash withdrawal. Transactions serve as the core entity for tracking business spending. They can be created directly by your system or imported from external sources such as accounting software or banking feeds.

Transactions can optionally be linked to receipts, which provide supporting documentation for auditing and reconciliation purposes.

Create a transaction

To manually create a new transaction, call POST /transactions:

1curl -X POST 'https://api.sandbox.monite.com/v1/transactions' \
2 -H 'accept: application/json' \
3 -H 'X-Monite-Version: 2024-05-25' \
4 -H 'X-Monite-Entity-Id: ENTITY_ID' \
5 -d '{
6 "amount": 4599,
7 "currency": "EUR",
8 "description": "Coffee machines order #7845",
9 "entity_user_id": "b79cb3ba-745e-5d9a-8903-4a02327a7e09",
10 "external_id": "txn-ext-7845",
11 "merchant_amount": 4599,
12 "merchant_currency": "EUR",
13 "merchant_location": "Berlin, DE",
14 "merchant_name": "Kaffeehaus GmbH",
15 "partner_metadata": {
16 "order_id": "ORD-7845-DE",
17 "cost_center": "BER-OFFICE"
18 },
19 "payment_method": {
20 "details": {
21 "brand": "Visa",
22 "card_type": "credit",
23 "expiry_month": 12,
24 "expiry_year": 2027,
25 "last4": "4821"
26 }
27 },
28 "started_at": "2025-08-19T14:11:11.842Z",
29 "status": "created",
30 "type": "capture"
31 }'

The successful 201 response returns the created transaction:

1{
2 "id": "trn_c9d1a6b4-9d2f-4b83-bf21-67d9c3e1a8f5",
3 "amount": 4599,
4 "currency": "EUR",
5 "description": "Coffee machines order #7845",
6 "entity_id": "b79cb3ba-745e-5d9a-8903-4a02327a7e09",
7 "entity_user_id": "fb3463a0-7d6e-54a3-bcd8-1b93388c648d",
8 "external_id": "txn-ext-7845",
9 "merchant_amount": 4599,
10 "merchant_currency": "EUR",
11 "merchant_location": "Berlin, DE",
12 "merchant_name": "Kaffeehaus GmbH",
13 "partner_metadata": {
14 "order_id": "ORD-7845-DE",
15 "cost_center": "BER-OFFICE"
16 },
17 "payment_method": {
18 "details": {
19 "brand": "Visa",
20 "card_type": "credit",
21 "expiry_month": 12,
22 "expiry_year": 2027,
23 "last4": "4821"
24 }
25 },
26 "started_at": "2025-08-19T14:11:11.843Z",
27 "status": "created",
28 "type": "capture"
29}

Create multiple transactions

You can create multiple transactions at once by calling POST /transactions/bulk. This endpoint is designed for high-volume inserts and supports up to 5000 records per request.

Each request must include a data array of transaction objects. The order of records in the request will be preserved in the response, so each result corresponds to the same index in the input.

If a transaction is successfully saved, the response will include its id. If a record fails validation or is ignored as a duplicate, the corresponding id will be null. A duplicate is defined as an identical pair of entity_id + external_id (where external_id is not null); in that case, the second duplicate will be skipped.

The response also contains counters showing how many records were successfully saved and how many failed:

1curl -X POST 'https://api.sandbox.monite.com/v1/transactions/bulk' \
2 -H 'accept: application/json' \
3 -H 'X-Monite-Version: 2024-05-25' \
4 -H 'X-Monite-Entity-Id: ENTITY_ID' \
5 -d '{
6 "data": [
7 {
8 "amount": 4599,
9 "currency": "EUR",
10 "description": "Coffee machines order #7845",
11 "entity_id": "fb3463a0-7d6e-54a3-bcd8-1b93388c648d",
12 "entity_user_id": "efe7eedd-89c5-56f5-984c-0712ee41a2eb",
13 "external_id": "txn-ext-7845",
14 "merchant_amount": 4599,
15 "merchant_currency": "EUR",
16 "merchant_location": "Berlin, DE",
17 "merchant_name": "Kaffeehaus GmbH",
18 "partner_metadata": {
19 "order_id": "ORD-7845-DE",
20 "cost_center": "BER-OFFICE"
21 },
22 "payment_method": {
23 "details": {
24 "brand": "Visa",
25 "card_type": "credit",
26 "expiry_month": 12,
27 "expiry_year": 2027,
28 "last4": "4821"
29 }
30 },
31 "started_at": "2025-08-19T14:11:11.843Z",
32 "status": "created",
33 "type": "capture"
34 },
35 {
36 "amount": 12900,
37 "currency": "EUR",
38 "description": "Office furniture invoice #9921",
39 "entity_id": "c40b683b-ac7b-5d6b-b0eb-549cb20169b9",
40 "entity_user_id": "440c0655-0bf6-51b6-a1fa-527f475a6fbc",
41 "external_id": "txn-ext-9921",
42 "merchant_amount": 12900,
43 "merchant_currency": "EUR",
44 "merchant_location": "Munich, DE",
45 "merchant_name": "BüroDesign AG",
46 "partner_metadata": {
47 "invoice_ref": "INV-9921-DE",
48 "department": "HQ-MUNICH"
49 },
50 "payment_method": {
51 "details": {
52 "brand": "Mastercard",
53 "card_type": "debit",
54 "expiry_month": 6,
55 "expiry_year": 2028,
56 "last4": "9375"
57 }
58 },
59 "started_at": "2025-08-19T15:05:42.113Z",
60 "status": "created",
61 "type": "capture"
62 }
63 ]
64}'

Match a receipt to a transaction

To match a receipt to a transaction, send a PATCH request to the /receipts/{receipt_id} endpoint with the request body containing the transaction_id associated with the recepit:

1curl -X PATCH 'https://api.sandbox.monite.com/v1/receipts/{receipt_id}' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "transaction_id": "fb3463a0-7d6e-54a3-bcd8-1b93388c648d"
8 }'

AI Receipt-to-Transaction Automatching

Receipts can be automatically matched to transactions by an AI-driven matching engine once the OCR is completed. The system evaluates only unmatched items with the same entity_id, a timestamp difference of ≤1 day, and either the same (amount + currency) or (merchant_amount + currency) (with ≤1% allowed difference).

The AI logic applies a two-step approach:

  1. Equal match - Exact merchant name match (case-insensitive, trimmed).
  2. Semantic match - If no exact match, merchant name + location are embedded and compared using fuzzy semantic similarity (≥0.8).

Considerations

  • The matching process runs only when receipts and transactions share the same entity_id and satisfy the required timestamp and amount conditions.
  • When an exact merchant name match is found, the receipt is immediately linked to the transaction.
  • If there is no exact match but the semantic similarity between merchant name and location is at least 0.8, the system also links the receipt automatically.
  • If neither condition is met, the receipt remains unmatched.
  • To ensure data consistency, each receipt can only ever be linked to one transaction.

List all transactions

To get information about all transactions associated with the specified entity, call GET /transactions.

Retrieve a transaction

To get information about a specific transaction, call GET /transactions/{transaction_id}.

Edit a transaction

To edit an existing transaction, call PATCH /transactions/{transaction_id}.

Delete a transaction

To delete a specific transaction, call DELETE /transactions/{transaction_id}.