Refund completed transactions.
Required OAuth scope: refunds/create.
Summary
Functions
Creates a refund.
Functions
@spec create( map(), keyword() ) :: {:ok, map()} | {:error, Teya.Error.t()}
Creates a refund.
Returns {:ok, response} where status is "SUCCESS", "FAILURE", or "PENDING".
A "PENDING" response (HTTP 202) means the refund is still being processed.
Note: HTTP 460 indicates a challenge is required before the refund can proceed.
Options
idempotency_key— override the auto-generated idempotency key
Examples
{:ok, _} = Teya.Refund.create(%{"transaction_id" => transaction_id})