---
title: "POST /market/buy"
method: POST
path: "/market/buy"
---

# POST /market/buy

`POST /market/buy`

Buy Members

## Request body

- object
  - `marketId` integer, required — The marketplace listing ID. You can get this by listing sellers or viewing https://vaultcord.com/market?developers=1
  - `inviteLink` string, required — Send the Discord.gg invite link we should deliver members to
  - `userEmail` string, required — Buyer email. You SHOULD send a unique email every time because we will show errors if a buyer attempts to buy same members twice.
  - `amount` integer, required — The number of members being purchased.
  - `budget` integer — (Optional) Limit the total cost of the order (since we've been told some sellers are naughty and raise prices suddenly) in cents. For example if you want the whole order to cost less than $20, then it will show as 2000

## Response `200`

Member marketplace order information, use this data to start a market pull

- object
  - `success` boolean
  - `data` MarketBuyObject
    - `newBalance` integer — Your remaining balance after the purchase. So if you have $5.50 left, it would show as 550
    - `url` string — VaultCord invoice page with bot invite button (for branded integrations)
    - `inviteUrl` string — Discord bot invite link (for white-label integrations)
    - `reference` string — Order reference. In case you want to build the URL manually rather than use our URL string.
    - `orderId` string — Order ID
    - `amount` integer — Number of members purchased
    - `guildId` string — Discord Guild (also called server) that the members will be sent to
    - `inviteCode` string — Discord invite that the members will be sent to
    - `userEmail` string — Buyer email. You SHOULD send a unique email every time because we will show errors if a buyer attempts to buy same members twice.
    - `status` string — Order status
    - `clientId` string — The Discord bot ID in case you want to build the invite link yourself. Format: https://discord.com/oauth2/authorize?client_id=<id>&permissions=1&response_type=code&scope=bot
    - `cost` integer — Cost in number of cents. So if an order cost $1.50 then it would show as 150
    - `created_at` string — The creation date of the order, in unix timestamp (seconds)

## Other responses

- `402` — You ran out of balance, needs to be refilled to buy more members.

---

[API](https://skmtc.dev/vaultcord/apis/vaultcord-developers-api.md) · [All operations](https://skmtc.dev/vaultcord/apis/vaultcord-developers-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vaultcord/vaultcord-developers-api/revisions/7790bd606410/schema)
