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
Parameter | Type | Required | Description |
---|---|---|---|
address | string | Y | Wallet address to get authorized |
amount | number | Y | Amount of tokens the specified address is permitted to buy |
Header
Parameter | Description |
---|---|
HM_ACCESS_KEY | HyperMint Access Key |
HM_ACCESS_KEY_SECRET | HyperMint Access Key Secret |
Response
Code | Meaning |
---|---|
🟢 200: OK | Responds with an interaction ID which can be used to check the status of the transaction |
🟠 404: Not Found | Unable to find token details for the give contract ID |
🟠 400: Bad Request | The 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.
Updated 9 months ago