# Agent Genesis Marketplace Use Binance Agentic Wallet on BNB Smart Chain (56). Enable Developer Mode for EIP-712 and contract-call previews. This guide covers marketplace trading; NFT mint instructions are at https://agx402.xyz/genesis/llms.txt. - Collection: 0x72AA667AeBF4c2A961b5DB3c58De163baf7210CA - Marketplace: 0x15819ebb5067d1bf38e64298813032654647390F - Payment asset: United Stables (U), 0xcE24439F2D9C6a2289F741120FE202248B666666, 18 decimals. - Sale proceeds: 97% seller, 2% treasury, 1% Genesis holders. These fees are included in the asking price. BNB network fees are separate. ## Buy 1. If the user provided a listing ID, request its quote directly. If they provided only the NFT number, look up the matching listing in GET https://agx402.xyz/api/genesis/market and confirm the listing with the user. GET https://agx402.xyz/api/genesis/market/x402?wallet=YOUR_WALLET&listing=LISTING_ID with the connected wallet's 0x address. The initial request accepts only wallet and listing. HTTP 402 is the expected quote response. Verify purchase.listing, tokenId, seller, amount, collection, marketplace, network and asset against the selected listing and the addresses in this guide. Convert the amount from 18-decimal base units and show the price in U. Stop on changed terms or an unavailable listing. 2. Check Developer Mode is enabled and unexpired. Pass the complete purchase.messageRequest JSON to baw sign-message preview --binanceChainId 56 --signType EIP712 --message JSON_REQUEST --json. Show the parsed terms and risks. Only after explicit user confirmation, execute a successful preview with baw sign-message execute --requestId REQUEST_ID --json. If App confirmation is pending, track that order and fetch baw sign-message result --order-id ORDER_ID --json. 3. Insert the 0x-prefixed 65-byte r+s+v signature into purchase.paymentPayload.payload.signature. If Binance returns 64 bytes plus signatureRecovery, append the recovery byte once. Base64-encode the complete paymentPayload JSON and GET the exact purchase.retryUrl with PAYMENT-SIGNATURE set to that value. Preserve this signed payload and retry URL for receipt checks. 4. On AWAITING_TRANSACTION, verify transaction.from matches the connected wallet, transaction.to is 0x15819ebb5067d1bf38e64298813032654647390F, and transaction.value is 0. Preview with baw contract-call preview --binanceChainId 56 --from BUYER_ADDRESS --to MARKETPLACE_ADDRESS --value 0 --inputData RETURNED_INPUT_DATA --json. Use the returned transaction.inputData unchanged. The x402 payTo identifies the payment inbox. Show the preview, risks, price and BNB network fee. After separate confirmation, execute once with baw contract-call execute --requestId REQUEST_ID --json. If Binance App confirmation is pending, track that order until it returns a transaction hash. Do not transfer U or BNB directly or approve a U token allowance. 5. Append &transaction=TX_HASH to the original purchase.retryUrl with the same PAYMENT-SIGNATURE. On AWAITING_CONFIRMATIONS, poll the same hash after Retry-After (3 seconds if absent). Continue after authorization expiry once broadcast. Success requires HTTP 200, PURCHASED and PAYMENT-RESPONSE after 12 confirmations. Report the NFT ID and transaction hash. Never resubmit a broadcast transaction. ## Sell or cancel Listing and cancellation are direct contract calls, not x402 payments. The NFT stays in the seller's wallet until a purchase succeeds. Prices are in U base units; for example, 10 U is 10000000000000000000. 1. Confirm the requested NFT ID, asking price, and connected wallet. Read collection ownerOf(uint256) and require that wallet to own the NFT. Read getApproved(uint256). If it is not the marketplace and isApprovedForAll(address,address) is false, preview collection approve(address,uint256) with the marketplace and that NFT ID. Ask for user confirmation, execute once, and wait for a successful receipt. Prefer approval for this NFT over approval for all NFTs. 2. Preview marketplace createListing(uint256,uint256) with the NFT ID and approved asking price. Native value is 0. Confirm terms and the network fee with the user before executing once. Verify ListingCreated and isListingActive(uint256); report the listing ID. A new listing cannot replace an active listing without cancelling it first. 3. To cancel, confirm the listing ID and read listings(uint256). Require the connected wallet to be its seller. Preview marketplace cancelListing(uint256), ask for confirmation, execute once and verify ListingCancelled. To change a price, cancel the old listing before approving a new listing transaction. A sale may complete before cancellation; check current state and stop if it has already sold. Use contract-call preview with the exact function ABI and arguments; stop on failed previews. Ownership or approval changes can invalidate a listing. Do not claim a sale or cancellation succeeded until its receipt confirms it. A marketplace purchase does not mint a new NFT. Trading does not require a .ai Agent ID in this contract; Genesis minting does. On HTTP 429 or 503, respect Retry-After and retry the same request. If a quote changes before broadcast, obtain fresh terms and user approval. Keep signatures out of chat and query strings. ## If payment or a purchase fails Check any pending Binance App order and the wallet's transaction history first. If a purchase was broadcast, continue the original retry URL with that same transaction hash. If it succeeded, report the purchased NFT and stop; if pending, wait. A timeout or an unavailable authorization does not prove a failed purchase. Never automatically pay or buy again. On PAYMENT_RECOVERY_AVAILABLE, compare recovery.payer, applicationContract, paymentInbox, orderHash and refundableAmount with the original purchase. The backend provides a simulated recovery.refundTransaction; it does not submit it. Confirm no matching purchase succeeded and no submission remains pending. Preview that exact transaction from the original payer wallet in Binance Agentic Wallet. The target must be the original marketplace, calling refundStandalonePayment(bytes32) for the original orderHash, with native value 0. Show the U refund amount and BNB network fee, obtain separate user approval, and execute once. No token approval or additional payment is needed. Wait for 12 confirmations. Verify the successful refund receipt, StandalonePaymentRefunded for the original payer and orderHash, and the U Transfer from that payment inbox to the payer for the refunded amount. Track the same refund hash while pending. After confirmation, obtain a new listing quote only if the user still wants to buy. The listing may be unavailable; do not choose another NFT automatically. Recheck price and seller and obtain fresh signing and transaction approvals. On AUTHORIZATION_UNAVAILABLE, reconcile the original purchase before re-signing. authorizationState alone cannot distinguish settlement from cancellation. If recovery.refundableAmount is 0, do not attempt a refund. If chain checks or the original transaction cannot be reconciled, stop and report the unresolved status. Never send an extra payment or transfer U directly to resolve a failure.