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

import typing_extensions
import typing_extensions
import typing
from ..types.activity_type import ActivityType
from .money import MoneyParams
from .payment_balance_activity_app_fee_revenue_detail import PaymentBalanceActivityAppFeeRevenueDetailParams
from .payment_balance_activity_app_fee_refund_detail import PaymentBalanceActivityAppFeeRefundDetailParams
from .payment_balance_activity_automatic_savings_detail import PaymentBalanceActivityAutomaticSavingsDetailParams
from .payment_balance_activity_automatic_savings_reversed_detail import (
    PaymentBalanceActivityAutomaticSavingsReversedDetailParams,
)
from .payment_balance_activity_charge_detail import PaymentBalanceActivityChargeDetailParams
from .payment_balance_activity_deposit_fee_detail import PaymentBalanceActivityDepositFeeDetailParams
from .payment_balance_activity_deposit_fee_reversed_detail import PaymentBalanceActivityDepositFeeReversedDetailParams
from .payment_balance_activity_dispute_detail import PaymentBalanceActivityDisputeDetailParams
from .payment_balance_activity_fee_detail import PaymentBalanceActivityFeeDetailParams
from .payment_balance_activity_free_processing_detail import PaymentBalanceActivityFreeProcessingDetailParams
from .payment_balance_activity_hold_adjustment_detail import PaymentBalanceActivityHoldAdjustmentDetailParams
from .payment_balance_activity_open_dispute_detail import PaymentBalanceActivityOpenDisputeDetailParams
from .payment_balance_activity_other_detail import PaymentBalanceActivityOtherDetailParams
from .payment_balance_activity_other_adjustment_detail import PaymentBalanceActivityOtherAdjustmentDetailParams
from .payment_balance_activity_refund_detail import PaymentBalanceActivityRefundDetailParams
from .payment_balance_activity_release_adjustment_detail import PaymentBalanceActivityReleaseAdjustmentDetailParams
from .payment_balance_activity_reserve_hold_detail import PaymentBalanceActivityReserveHoldDetailParams
from .payment_balance_activity_reserve_release_detail import PaymentBalanceActivityReserveReleaseDetailParams
from .payment_balance_activity_square_capital_payment_detail import (
    PaymentBalanceActivitySquareCapitalPaymentDetailParams,
)
from .payment_balance_activity_square_capital_reversed_payment_detail import (
    PaymentBalanceActivitySquareCapitalReversedPaymentDetailParams,
)
from .payment_balance_activity_tax_on_fee_detail import PaymentBalanceActivityTaxOnFeeDetailParams
from .payment_balance_activity_third_party_fee_detail import PaymentBalanceActivityThirdPartyFeeDetailParams
from .payment_balance_activity_third_party_fee_refund_detail import (
    PaymentBalanceActivityThirdPartyFeeRefundDetailParams,
)
from .payment_balance_activity_square_payroll_transfer_detail import (
    PaymentBalanceActivitySquarePayrollTransferDetailParams,
)
from .payment_balance_activity_square_payroll_transfer_reversed_detail import (
    PaymentBalanceActivitySquarePayrollTransferReversedDetailParams,
)


class PayoutEntryParams(typing_extensions.TypedDict):
    """
    One or more PayoutEntries that make up a Payout. Each one has a date, amount, and type of activity.
    The total amount of the payout will equal the sum of the payout entries for a batch payout
    """

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

    payout_id: str
    """
    The ID of the payout entries’ associated payout.
    """

    effective_at: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The timestamp of when the payout entry affected the balance, in RFC 3339 format.
    """

    type: typing_extensions.NotRequired[ActivityType]
    """
    The type of activity associated with this payout entry.
    See [ActivityType](#type-activitytype) for possible values
    """

    gross_amount_money: typing_extensions.NotRequired[MoneyParams]
    """
    The amount of money involved in this payout entry.
    """

    fee_amount_money: typing_extensions.NotRequired[MoneyParams]
    """
    The amount of Square fees associated with this payout entry.
    """

    net_amount_money: typing_extensions.NotRequired[MoneyParams]
    """
    The net proceeds from this transaction after any fees.
    """

    type_app_fee_revenue_details: typing_extensions.NotRequired[PaymentBalanceActivityAppFeeRevenueDetailParams]
    """
    Details of any developer app fee revenue generated on a payment.
    """

    type_app_fee_refund_details: typing_extensions.NotRequired[PaymentBalanceActivityAppFeeRefundDetailParams]
    """
    Details of a refund for an app fee on a payment.
    """

    type_automatic_savings_details: typing_extensions.NotRequired[PaymentBalanceActivityAutomaticSavingsDetailParams]
    """
    Details of any automatic transfer from the payment processing balance to the Square Savings account. These are, generally, proportional to the merchant's sales.
    """

    type_automatic_savings_reversed_details: typing_extensions.NotRequired[
        PaymentBalanceActivityAutomaticSavingsReversedDetailParams
    ]
    """
    Details of any automatic transfer from the Square Savings account back to the processing balance. These are, generally, proportional to the merchant's refunds.
    """

    type_charge_details: typing_extensions.NotRequired[PaymentBalanceActivityChargeDetailParams]
    """
    Details of credit card payment captures.
    """

    type_deposit_fee_details: typing_extensions.NotRequired[PaymentBalanceActivityDepositFeeDetailParams]
    """
    Details of any fees involved with deposits such as for instant deposits.
    """

    type_deposit_fee_reversed_details: typing_extensions.NotRequired[
        PaymentBalanceActivityDepositFeeReversedDetailParams
    ]
    """
    Details of any reversal or refund of fees involved with deposits such as for instant deposits.
    """

    type_dispute_details: typing_extensions.NotRequired[PaymentBalanceActivityDisputeDetailParams]
    """
    Details of any balance change due to a dispute event.
    """

    type_fee_details: typing_extensions.NotRequired[PaymentBalanceActivityFeeDetailParams]
    """
    Details of adjustments due to the Square processing fee.
    """

    type_free_processing_details: typing_extensions.NotRequired[PaymentBalanceActivityFreeProcessingDetailParams]
    """
    Square offers Free Payments Processing for a variety of business scenarios including seller referral or when Square wants to apologize for a bug, customer service, repricing complication, and so on. This entry represents details of any credit to the merchant for the purposes of Free Processing.
    """

    type_hold_adjustment_details: typing_extensions.NotRequired[PaymentBalanceActivityHoldAdjustmentDetailParams]
    """
    Details of any adjustment made by Square related to the holding or releasing of a payment.
    """

    type_open_dispute_details: typing_extensions.NotRequired[PaymentBalanceActivityOpenDisputeDetailParams]
    """
    Details of any open disputes.
    """

    type_other_details: typing_extensions.NotRequired[PaymentBalanceActivityOtherDetailParams]
    """
    Details of any other type that does not belong in the rest of the types.
    """

    type_other_adjustment_details: typing_extensions.NotRequired[PaymentBalanceActivityOtherAdjustmentDetailParams]
    """
    Details of any other type of adjustments that don't fall under existing types.
    """

    type_refund_details: typing_extensions.NotRequired[PaymentBalanceActivityRefundDetailParams]
    """
    Details of a refund for an existing card payment.
    """

    type_release_adjustment_details: typing_extensions.NotRequired[PaymentBalanceActivityReleaseAdjustmentDetailParams]
    """
    Details of fees released for adjustments.
    """

    type_reserve_hold_details: typing_extensions.NotRequired[PaymentBalanceActivityReserveHoldDetailParams]
    """
    Details of fees paid for funding risk reserve.
    """

    type_reserve_release_details: typing_extensions.NotRequired[PaymentBalanceActivityReserveReleaseDetailParams]
    """
    Details of fees released from risk reserve.
    """

    type_square_capital_payment_details: typing_extensions.NotRequired[
        PaymentBalanceActivitySquareCapitalPaymentDetailParams
    ]
    """
    Details of capital merchant cash advance (MCA) assessments. These are, generally, proportional to the merchant's sales but may be issued for other reasons related to the MCA.
    """

    type_square_capital_reversed_payment_details: typing_extensions.NotRequired[
        PaymentBalanceActivitySquareCapitalReversedPaymentDetailParams
    ]
    """
    Details of capital merchant cash advance (MCA) assessment refunds. These are, generally, proportional to the merchant's refunds but may be issued for other reasons related to the MCA.
    """

    type_tax_on_fee_details: typing_extensions.NotRequired[PaymentBalanceActivityTaxOnFeeDetailParams]
    """
    Details of tax paid on fee amounts.
    """

    type_third_party_fee_details: typing_extensions.NotRequired[PaymentBalanceActivityThirdPartyFeeDetailParams]
    """
    Details of fees collected by a 3rd party platform.
    """

    type_third_party_fee_refund_details: typing_extensions.NotRequired[
        PaymentBalanceActivityThirdPartyFeeRefundDetailParams
    ]
    """
    Details of refunded fees from a 3rd party platform.
    """

    type_square_payroll_transfer_details: typing_extensions.NotRequired[
        PaymentBalanceActivitySquarePayrollTransferDetailParams
    ]
    """
    Details of a payroll payment that was transferred to a team member’s bank account.
    """

    type_square_payroll_transfer_reversed_details: typing_extensions.NotRequired[
        PaymentBalanceActivitySquarePayrollTransferReversedDetailParams
    ]
    """
    Details of a payroll payment to a team member’s bank account that was deposited back to the seller’s account by Square.
    """
