GET: Authorise Buy

Generates a signature that permits a specific wallet to buy a specified amount of a specific token. This endpoint validates that the specified wallet is permitted to perform this action, taking into account allow lists as well as public sale windows. Suitable for use directly from storefronts.

https://api.hypermint.com/v1/nft-contract/:contractId/token/:tokenId/authorise-buy?address=:address&amount=:amount

Get Authorise Buy

Get a Signature which allows a wallet to initiate a buy

Parameters

Query

ParameterTypeRequiredDescription
addressstringYWallet address to get authorized
amountnumberYAmount of tokens the specified address is permitted to buy

Header

ParameterDescription
HM_ACCESS_KEYHyperMint Access Key
HM_ACCESS_KEY_SECRETHyperMint Access Key Secret

Response

CodeMeaning
🟢 200: OKResponds with an interaction ID which can be used to check the status of the transaction
🟠 404: Not FoundUnable to find token details for the give contract ID
🟠 400: Bad RequestThe request sent was malformed or did not pass as a valid authorisation request. The error message will explain the reason as to why the request couldn't be serviced.
interface AuthPresaleResponse {
    totalPrice: number;
    maxPerAddress?: number;
    expires: number;
    signature: string;
}

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.