Monzo.Receipts (monzo_client v1.0.0)

Copy Markdown View Source

The Transaction Receipts resource. Unlike every other Monzo resource, this endpoint is JSON-bodied rather than form-encoded.

Summary

Functions

Creates or updates a receipt for a transaction. external_id acts as an idempotency key: calling this again with the same external_id updates the existing receipt.

Deletes a receipt by its external_id.

Reads back a receipt you created, by its external_id. You can only read your own receipts.

Functions

create(client, receipt)

@spec create(Monzo.Client.t(), Monzo.Receipt.t()) ::
  {:ok, String.t()} | {:error, Exception.t()}

Creates or updates a receipt for a transaction. external_id acts as an idempotency key: calling this again with the same external_id updates the existing receipt.

delete(client, external_id)

@spec delete(Monzo.Client.t(), String.t()) :: :ok | {:error, Exception.t()}

Deletes a receipt by its external_id.

retrieve(client, external_id)

@spec retrieve(Monzo.Client.t(), String.t()) ::
  {:ok, Monzo.Receipt.t()} | {:error, Exception.t()}

Reads back a receipt you created, by its external_id. You can only read your own receipts.