CraftPayDocs
API reference

Packages

What you sell. Commands are never returned – they can contain internal setup.

List packages

GET/v1/packages API key

Active packages in display order. type is ONE_TIME or SUBSCRIPTION; durationDays is set for ranks that expire.

Query parameters

NameTypeDescription
include_inactivebooleantrue also returns packages that are switched off.
Request
curl https://api.craftpay.net/v1/packages \
  -H "Authorization: Bearer cp_sk_..."
Response · 200
{
  "data": [
    {
      "id": "cm3k9x8qw0004",
      "name": "VIP",
      "description": "Coloured name, /fly and 2 homes.",
      "imageUrl": null,
      "price": { "amount": 499, "currency": "EUR" },
      "type": "SUBSCRIPTION",
      "durationDays": null,
      "interval": "month",
      "active": true,
      "categoryId": "cm3k9x5aa0002",
      "buyUrl": "https://mist.craftpay.net/checkout?add=cm3k9x8qw0004"
    }
  ]
}

Get a package

GET/v1/packages/{id} API key

One package by id – also when it's inactive.

Request
curl https://api.craftpay.net/v1/packages/cm3k9x8qw0004 \
  -H "Authorization: Bearer cp_sk_..."
Response · 200
{
  "data": {
    "id": "cm3k9x8qw0004",
    "name": "VIP",
    "price": { "amount": 499, "currency": "EUR" },
    "type": "SUBSCRIPTION",
    "active": true
  }
}

Stuck? Write to mail@craftpay.net