# This file was auto-generated by Fern from our API Definition.

import typing_extensions
import typing_extensions
from ..types.payout_status import PayoutStatus
from .money import MoneyParams
from .destination import DestinationParams
from ..types.payout_type import PayoutType
import typing
from .payout_fee import PayoutFeeParams


class PayoutParams(typing_extensions.TypedDict):
    """
    An accounting of the amount owed the seller and record of the actual transfer to their
    external bank account or to the Square balance.
    """

    id: str
    """
    A unique ID for the payout.
    """

    status: typing_extensions.NotRequired[PayoutStatus]
    """
    Indicates the payout status.
    See [PayoutStatus](#type-payoutstatus) for possible values
    """

    location_id: str
    """
    The ID of the location associated with the payout.
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the payout was created and submitted for deposit to the seller's banking destination, in RFC 3339 format.
    """

    updated_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the payout was last updated, in RFC 3339 format.
    """

    amount_money: typing_extensions.NotRequired[MoneyParams]
    """
    The amount of money involved in the payout. A positive amount indicates a deposit, and a negative amount indicates a withdrawal. This amount is never zero.
    """

    destination: typing_extensions.NotRequired[DestinationParams]
    """
    Information about the banking destination (such as a bank account, Square checking account, or debit card)
    against which the payout was made.
    """

    version: typing_extensions.NotRequired[int]
    """
    The version number, which is incremented each time an update is made to this payout record.
    The version number helps developers receive event notifications or feeds out of order.
    """

    type: typing_extensions.NotRequired[PayoutType]
    """
    Indicates the payout type.
    See [PayoutType](#type-payouttype) for possible values
    """

    payout_fee: typing_extensions.NotRequired[typing.Optional[typing.Sequence[PayoutFeeParams]]]
    """
    A list of transfer fees and any taxes on the fees assessed by Square for this payout.
    """

    arrival_date: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is due to arrive in the seller’s banking destination.
    """

    end_to_end_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A unique ID for each `Payout` object that might also appear on the seller’s bank statement. You can use this ID to automate the process of reconciling each payout with the corresponding line item on the bank statement.
    """
