Money paid out of an account's balance to its bank account or card (a payout, po_... at
Stripe): the platform's own, or, with a site's keys that name a connected account, the
seller's. Read with MishkaPay.fetch_payout/3 and MishkaPay.list_payouts/3, and stopped
with MishkaPay.cancel_payout/3 while it is still :pending. A guarded_struct the provider
fills in.
:provider,:id.:amount: what is paid out.:status::pending,:in_transit,:paid,:failedor:canceled.:arrival_at: when it is expected at the bank, or arrived.:automatic:truewhen the provider's payout schedule made it,falsewhen someone asked for it.:method:"standard"or"instant".:destination_id: the bank account or card it goes to.:failure_code,:failure_message: why it failed, in the provider's words.:description,:created_at.
MishkaPay.list_balance_transactions/3 with payout_id: lists what one automatic payout paid
out.
Summary
Functions
A sample %MishkaPay.Balance.Payout{} populated from defaults + type-based fallbacks.
Types
@type t() :: %MishkaPay.Balance.Payout{ amount: Money.t() | nil, arrival_at: DateTime.t() | nil, automatic: boolean() | nil, created_at: DateTime.t() | nil, description: String.t() | nil, destination_id: String.t() | nil, failure_code: String.t() | nil, failure_message: String.t() | nil, id: String.t(), method: String.t() | nil, provider: String.t(), status: (:pending | :in_transit | :paid | :failed | :canceled) | nil }
The struct that builder/1 returns.
| Field | Type | Required | Default | Description | Derives |
|---|---|---|---|---|---|
:provider | String.t() | yes | validate(not_nil_value, string) | ||
:id | String.t() | yes | validate(not_nil_value, string, not_empty) | ||
:amount | Money.t() | nil | no | validator {MishkaPay.Money, :field} | ||
:status | :pending | :in_transit | :paid | :failed | :canceled | nil | no | validate(enum=Atom[pending::in_transit::paid::failed::canceled]) | ||
:arrival_at | DateTime.t() | nil | no | validate(struct) | ||
:automatic | boolean() | nil | no | false | validate(boolean) | |
:method | String.t() | nil | no | validate(string) | ||
:destination_id | String.t() | nil | no | validate(string) | ||
:failure_code | String.t() | nil | no | validate(string) | ||
:failure_message | String.t() | nil | no | validate(string) | ||
:description | String.t() | nil | no | validate(string) | ||
:created_at | DateTime.t() | nil | no | validate(struct) |