Wallet

The Zing Protocol wallet manages your USDC balance for all platform transactions including memberships, donations, and storage purchases.

The Wallet Model

Properties

  • Name
    address
    Type
    string
    Description

    The user's Sui address (derived from zkLogin).

  • Name
    balance
    Type
    string
    Description

    Current USDC balance (e.g., "100.00").

  • Name
    currency
    Type
    string
    Description

    Always "USDC" for Zing Protocol.

  • Name
    total_received
    Type
    string
    Description

    Total USDC received all-time.

  • Name
    total_sent
    Type
    string
    Description

    Total USDC sent all-time.


GET/v1/wallet/balance

Get Balance

Get the current USDC balance for the authenticated user.

Request

GET
/v1/wallet/balance
curl https://api.zing.protocol/v1/wallet/balance \
  -H "Authorization: Bearer {jwt_token}"

POST/v1/wallet/topup

Top Up Wallet

Transfer USDC from a connected external Sui wallet to your Zing wallet.

Required attributes

  • Name
    amount
    Type
    string
    Description

    Amount of USDC to transfer (e.g., "50.00").

How it works

  1. Connect an external Sui wallet
  2. Specify the amount to transfer
  3. Sign the transaction in your external wallet
  4. USDC is transferred to your Zing wallet

Transaction fee

~0.001 USDC for Sui blockchain gas

Request

POST
/v1/wallet/topup
curl https://api.zing.protocol/v1/wallet/topup \
  -H "Authorization: Bearer {jwt_token}" \
  -d amount="50.00"

POST/v1/wallet/payout

Withdraw Funds

Withdraw USDC from your Zing wallet to an external Sui address.

Required attributes

  • Name
    amount
    Type
    string
    Description

    Amount of USDC to withdraw (e.g., "25.00").

  • Name
    destination
    Type
    string
    Description

    Destination Sui address.

Important notes

  • Minimum withdrawal: 1 USDC
  • Transaction fee: 0.001 USDC (deducted from amount)
  • Ensure destination address is correct - transactions are irreversible

Request

POST
/v1/wallet/payout
curl https://api.zing.protocol/v1/wallet/payout \
  -H "Authorization: Bearer {jwt_token}" \
  -d amount="25.00" \
  -d destination="0xexternal...wallet"

GET/v1/wallet/transactions

Transaction History

Get a paginated list of all wallet transactions.

Query parameters

  • Name
    type
    Type
    enum
    Description

    Filter by type: topup, payout, membership, donation, storage.

  • Name
    limit
    Type
    integer
    Description

    Number of results (default: 10).

  • Name
    cursor
    Type
    string
    Description

    Pagination cursor.

Request

GET
/v1/wallet/transactions
curl https://api.zing.protocol/v1/wallet/transactions \
  -H "Authorization: Bearer {jwt_token}" \
  -d limit=10

Wallet Flow: Top Up

User clicks "Top Up" in wallet section

Dialog shows:
  - Current Zing wallet address
  - "Connect External Wallet" button
  - Amount input field

User connects external Sui wallet (e.g., Sui Wallet, Martian)

User enters amount to transfer

User clicks "Transfer" button

Transaction signed in external wallet

USDC transferred to Zing wallet

Balance updated, success notification

Wallet Flow: Payout

User clicks "Withdraw" in wallet section

Dialog shows:
  - Current balance
  - Amount input field
  - Destination Sui address field
  - Fee breakdown
  - "Total to receive" calculation

User enters amount and destination address

Validation:
  - Amount >= 1 USDC
  - Amount <= balance
  - Valid Sui address format

User clicks "Withdraw" button

Transaction submitted to Sui blockchain

Funds sent to destination address

Confirmation shown with tx hash

Fees Summary

ActionFee
Top Up~0.001 USDC (Sui gas)
Payout0.001 USDC
Membership0.001 USDC
Donation0.001 USDC
Storage Purchase0.001 USDC

Balance Requirements

ActionMinimum Balance
Subscribe (Basic)Tier price + fee
Subscribe (Premium)Tier price + fee
Subscribe (Ultra)Tier price + fee
DonateDonation amount + fee
Storage PurchaseStorage cost + fee
Withdraw1 USDC + fee

Security

Next Steps

Was this page helpful?