API module for Unit Disputes.
Disputes are filed when a customer wants to contest a card transaction. Unit manages the dispute process with the card network on your behalf.
Dispute flow
- Customer identifies an unauthorized or incorrect charge
- You create a dispute via the API
- Unit investigates with the card network
- Status progresses through
InvestigationStarted→ProvisionallyCredited→ResolvedWonorResolvedLost
Important
Disputes are only available for card transactions. For ACH returns, use
Unit.API.Payments.return_received_ach/3.
Summary
Functions
@spec create( map(), keyword() ) :: {:ok, Unit.Resource.Dispute.t()} | {:error, term()}
Create a dispute for a card transaction.
Required params
:account_id:transaction_id— the disputed card transaction ID:description— reason for the dispute:source—"Debit"or"Credit"
Optional
:tags
@spec get( String.t(), keyword() ) :: {:ok, Unit.Resource.Dispute.t()} | {:error, term()}
Get a dispute by ID.
@spec list(keyword()) :: {:ok, [Unit.Resource.Dispute.t()], map()} | {:error, term()}
List disputes.
Filter options
:account_id,:customer_id:status:since,:until:page_limit,:page_offset