NFT Purchase in Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
NFT Purchase in Mobile App
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing NFT Purchase in a Mobile App

Buying an NFT means calling a marketplace smart contract function, passing the required ETH or ERC-20 amount. Sounds simple, but between clicking "Buy" and a confirmed transaction are several steps where things go wrong: gas depleted, NFT already sold, wallet not connected. UX must handle each case.

Checking Listing Availability Before Purchase

Before showing the "Buy" button, verify the listing's current status. The NFT might have sold a second ago; the cached screen doesn't know.

// iOS — checking listing status before purchase
func checkListingActive(contractAddress: String, tokenId: BigUInt) async throws -> Bool {
    let listing = try await marketplaceContract.getListing(
        nftAddress: EthereumAddress(contractAddress)!,
        tokenId: tokenId
    )
    return listing.price > 0 && listing.seller != EthereumAddress.zero
}

If inactive — change button to "Not for Sale," no purchase dialog.

Approve + Buy: One or Two Transactions

Buying with ETH is one transaction: buyItem(nftContract, tokenId, { value: price }).

Buying with ERC-20 (e.g., USDC) is two:

  1. usdc.approve(marketplaceAddress, price) — authorize the marketplace to spend tokens
  2. marketplace.buyItem(nftContract, tokenId) — actual purchase

Show this as a single unified flow: "Step 1 of 2: Approve USDC Spending" → "Step 2 of 2: Confirm Purchase." Progress indicator, explanation at each step.

Optimization: use permit (EIP-2612) if the token supports it. This combines approve and buy into one transaction via off-chain signature.

Awaiting Confirmation

After sending the transaction, don't block the screen. Display:

  • TransactionHash as an Explorer link (Etherscan, Polygonscan)
  • "Awaiting Confirmation" indicator with option to leave
  • Push when N confirmations are received (usually 1–3)
// Android — waiting for receipt with timeout
suspend fun waitForReceipt(txHash: String, timeoutMs: Long = 120_000): TransactionReceipt? {
    val deadline = System.currentTimeMillis() + timeoutMs
    while (System.currentTimeMillis() < deadline) {
        val receipt = web3j.ethGetTransactionReceipt(txHash).send().transactionReceipt
        if (receipt.isPresent) return receipt.get()
        delay(3_000)
    }
    return null
}

If receipt.status == "0x0" — transaction reverted. Decode the reason via debug_traceTransaction or check known contract errors.

Typical Errors and Handling

Error Cause UI Response
execution reverted: Not listed NFT delisted "NFT no longer for sale"
execution reverted: Price mismatch Price changed Show current price, offer refresh
insufficient funds Not enough ETH for gas "Top up wallet for gas fee"
Transaction timeout Network congestion Offer to increase gas price

Timeline: 3–5 days for listing check, approve+buy flow, confirmation awaiting with push, error handling.