updateTransactionMetadata mutation.
Annotations are supported on:
- Deposits (
depositCashBalance1) - Gift card purchases (
purchaseGiftCard) - Wallet transfers (
createTransfer,transferInternalBalance) - Virtual card creation (
createVirtualCard)attachmentis excluded
How it works
- Optional: If you want to attach a file, uplaod it first via the REST upload endpoint. You’ll get back an
attachmentId. - Pass
memo,transactionCategory, and/orattachmentIdinto your mutation input — either at transaction time or later viaupdateTransactionMetadata. - Read annotations back on
getTransactions,getUserPurchases, or the mutation response. TheattachmentUrlfield returns a short-lived signed URL for file access.
Step 1: Upload an attachment (optional)
This is a REST endpoint, not a GraphQL mutation
Endpoint
POST /api/v1/file-upload/transaction-memo-attachment
Authentication
Authorization: Bearer <YOUR_USER_ACCESS_TOKEN>
Request
Send the file asmultipart/form-data with the field name file.
Accepted types: application/pdf, image/png
⚠️ JPEG is not accepted for transaction attachments.
Sample Request
Response
attachmentId — you’ll pass it into your mutation input in the next step.
The attachmentId is scoped to your account. The system verifies the file exists in your account’s storage when you submit the mutation. An ID from a different account will be rejected.
Upload Errors
Step 2: Annotate the transaction
You can provide annotations at the time of the original transaction or update them afterward.Option A — At transaction time
The following mutations acceptmemo, transactionCategory, and attachmentId as optional fields in their input:
depositCashBalance→DepositCashBalanceInputpurchaseGiftCard→PurchaseGiftCardInputcreateTransfer→CreateTransferInputtransferInternalBalance→TransferInternalBalanceInput
Annotation Fields
Sample — Purchase Gift Card with Annotation
Option B — After the transaction (updateTransactionMetadata)
Use this mutation to add or update annotations on any existing transaction.
Partial update semantics: Only the fields you include are updated. Omitted fields are left unchanged. Pass null to clear a field.
Mutation
UpdateTransactionMetadataInput
Required Scopes
LIST_PAYMENT and LIST_PURCHASES
Sample — Add a memo and category
Sample — Attach a file to an existing transaction
Sample — Clear a memo
Sample Response
Errors
Reading annotations
Annotations are returned on the following:
⚠️ attachmentUrl is a signed URL. It expires shortly after being generated. Do not store it — re-fetch the transaction when you need to display or access the file.