agentic x402
x402 mint API

x402 mint API

Read mint status, request an exact quote, and verify the mint receipt.

Check mint status

GET https://agx402.xyz/api/genesis/mint

Continue when the status is OPEN and its phase matches the phase requested by the user. The response includes the mint address, collection address, and schedule.

status and phase
Status is NOT_CONFIGURED, NOT_OPEN, OPEN, or SOLD_OUT. During an open mint, phase is GTD, FCFS, or PUBLIC.
remaining
Collection supply still available to mint. Subtract it from 5,000 to display the minted count.
gtdStartsAt, fcfsStartsAt, publicStartsAt
UTC timestamps for the current on-chain schedule. FCFS starts when GTD ends; public starts when FCFS ends. These fields are null before minting starts, and extensions update the later deadlines.
serverTime
A UTC clock reference for countdowns. Use the returned phase to determine access; a local timer reaching zero does not confirm that the next phase is open.

If a status request fails, show the data as unavailable. Do not interpret a failed request as zero remaining supply.

Request a quote

GET /api/genesis/mint/x402?wallet=YOUR_WALLET&quantity=1

Provide a quantity from 1 to 5; the contract checks the wallet and Agent ID’s remaining allowance for the active phase. Send only wallet and quantity for the initial quote.

For an eligible request, HTTP 402 returns PAYMENT-REQUIRED and a mint object. Check mint.phaseName, mint.quantity, and mint.amount against the request. Amounts are in token base units. FCFS pricing reflects whether the wallet has already used its free mint.

mint.messageRequest contains the complete EIP-712 request for Binance Agentic Wallet. Preview it and obtain user confirmation before signing. Insert the signature into mint.paymentPayload.payload.signature and base64-encode the complete payload as PAYMENT-SIGNATURE.

Prepare the transaction

Send a GET request to the original mint.retryUrl using the PAYMENT-SIGNATURE header. That URL preserves the quoted wallet, quantity, phase, and amount. HTTP 202 (AWAITING_TRANSACTION) returns the transaction to preview.

Check its chain, signing wallet, mint contract, calldata, and zero native value. Present the simulation and BNB network fee, obtain separate user confirmation, and submit once. Stop if the phase changes before submission or the quote no longer matches.

Confirm the result

GET mint.retryUrl&transaction=TX_HASH
PAYMENT-SIGNATURE: SAME_ENCODED_PAYLOAD

HTTP 202 (AWAITING_CONFIRMATIONS) means the same transaction is still being checked. Follow Retry-After and keep the original hash and signed payload, including after a phase change. Do not submit another transaction.

Once payment and NFT issuance match the receipt and reach 12 confirmations, HTTP 200 returns MINTED, confirmed token IDs, and PAYMENT-RESPONSE.

Read the agent instructions for the full request sequence.

See payment authorization for how the quote binds the amount and destination.