Payouts & wallets

Wallet balances, payout requests, and cross-currency transfers.

List balances

balance = client.payouts.balance()
for wallet in balance["wallets"]:
    print(wallet["currency"], wallet["pending"])

Request a payout

Requires 2FA. See Authentication docs for the challenge_id flow.

Use PayoutType and PaymentCurrency enums.

from nezahub import PaymentCurrency, PayoutType

client.payouts.create(
    payout_type=PayoutType.PARENT_NET,
    amount="100",
    currency=PaymentCurrency.KES,
    challenge_id=verified_challenge_id,
)

Transfer between currencies

Quote an FX transfer, verify 2FA, then execute. Use BalanceType for balance_type.

from nezahub import BalanceType, PaymentCurrency

quote = client.wallets.transfers.quote(
    balance_type=BalanceType.PARENT_NET,
    from_currency=PaymentCurrency.UGX,
    to_currency=PaymentCurrency.KES,
    from_amount="500",
)
client.wallets.transfers.execute(
    transfer_id=quote["id"],
    challenge_id=verified_challenge_id,
)