# Create a Transaction

> Solarium docs, Transactions. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Creates a new ledger event (manual entry). The event starts in needs_review status and must be classified and confirmed before it posts to the books.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `merchantName` | `String!` | Yes | Vendor / merchant name |
| `amount` | `String!` | Yes | Transaction amount (positive decimal string) |
| `transactionDate` | `String!` | Yes | Date of transaction (YYYY-MM-DD) |
| `eventType` | `String` | No | expense, income, or transfer (default expense) |
| `categoryId` | `UUID` | No | Expense/income account to categorize under |
| `paymentAccountId` | `UUID` | No | Bank/credit card account used for payment |
| `taxAmount` | `String` | No | Tax portion of the amount (single-tax, e.g. HST/GST) |
| `taxAccountId` | `UUID` | No | Tax account for the single-tax amount (e.g. HST Payable) |
| `taxCode` | `String` | No | Tax code for the single-tax amount (e.g. HST_ON) |
| `taxComponents` | `JSONString` | No | Multi-tax entry — array of { sales_tax_code, amount } (e.g. GST + PST in BC). Overrides taxAmount/taxCode; the server resolves each component's account. |

### Request

```graphql
mutation {
  createLedgerEvent(
    organizationId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    merchantName: "Canada Post"
    amount: "34.95"
    transactionDate: "2026-06-20"
    eventType: "expense"
    categoryId: "a6b7c8d9-e0f1-2345-6789-abcdef012345"
    paymentAccountId: "e4f5a6b7-c8d9-0123-ef01-23456789abcd"
  ) {
    success
    eventId
  }
}
```

### Response

```json
{
  "data": {
    "createLedgerEvent": {
      "success": true,
      "eventId": "d9e0f1a2-b3c4-5678-d901-ef0123456789"
    }
  }
}
```
