Resolve Presale

Endpoint: POST /merchant/presale/resolve | Auth: ๐Ÿ”’ Secret Key | Purpose: Manually resolve a presale

๐Ÿค– AI Implementation Summary:

  • Required: presaleId

Resolve a presale manually. It will complete or end presale based on raised amount


POSTapi.metal.build/merchant/presale/resolve

Resolve a presale

This endpoint allows you to resolve a presale manually. If the target is not hit, resolving the presale will trigger a refund. If the target is hit, and the presale is not set to autoLaunch resolving will launch the token.

Tokens will always refund automatically if the goal is not reached.


Required attributes

  • Name
    presaleId
    Type
    string
    Description

    Presale Id (e.g., "bec1dcbd-9520-4bd2-824c-9861f811160b"). Required

Request

POST
api.metal.build/merchant/presale/resolve
const response = await fetch('https://api.metal.build/merchant/presale/resolve', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_SECRET_API_KEY',
  },
  body: JSON.stringify({
    "presaleId": "bec1dcbd-9520-4bd2-824c-9861f811160b"
  }),
})

const presale = await response.json()

Response

{
  "id": "81ce774a-ebaf-4d19-ba77-b1dbb41bc5d1",
  "status": "completed",
  "participants": [],
}

Was this page helpful?