Digital receipts for completed transactions.
Required OAuth scope: transactions/id/receipts/create.
Summary
Functions
Creates a digital receipt for a transaction.
Functions
@spec create(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Teya.Error.t()}
Creates a digital receipt for a transaction.
transaction_id is the UUID of the completed transaction. The API returns HTTP 202
(accepted for processing) on success — receipt delivery is asynchronous.
Options
idempotency_key— override the auto-generated idempotency key
Examples
{:ok, _} = Teya.Receipt.create(transaction_id, %{"email" => "customer@example.com"})