# Attach Receipt to 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

Attaches an uploaded receipt (image or PDF) to a ledger event. The file must already be uploaded to S3 — pass the s3Key returned from the upload endpoint.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `eventId` | `UUID!` | Yes | Ledger event ID to attach the receipt to |
| `s3Key` | `String!` | Yes | S3 object key of the uploaded receipt file |
| `filename` | `String` | No | Original filename for display (e.g. receipt.pdf) |

### Request

```graphql
mutation {
  attachReceiptToEvent(
    organizationId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    eventId: "b7c8d9e0-f1a2-3456-b789-cdef01234567"
    s3Key: "receipts/a1b2c3d4/2026/06/canadapost-shipping-label.pdf"
    filename: "canadapost-shipping-label.pdf"
  ) {
    success
    receiptId
  }
}
```

### Response

```json
{
  "data": {
    "attachReceiptToEvent": {
      "success": true,
      "receiptId": "b1c2d3e4-f5a6-7890-bcde-f01234567890"
    }
  }
}
```
