CraftPayDocs
Minecraft plugin

Install the plugin

The CraftPay plugin runs the commands from your packages on your server when someone buys.

Requirements

  • Paper or Spigot 1.17 or newer.
  • Java 17 or newer.
  • A CraftPay store.

Install

  1. 1Add the server in the dashboard: store → Servers & plugin.
  2. 2Put CraftPay.jar in the server's plugins folder and restart the server.
  3. 3Copy the server's secret key from the dashboard and run this in the server console:
Console
craftpay secret <your-server-key>

The plugin saves the key and tests the connection right away. The dashboard shows the server as connected within a minute.

config.yml

You rarely need to change this. The file is in plugins/CraftPay/config.yml:

plugins/CraftPay/config.yml
# The CraftPay platform address (no trailing slash)
api-url: "https://api.craftpay.net"

# The server's secret key (set with: craftpay secret <key>)
secret: ""

# How often the queue is checked (seconds, min. 15)
interval-seconds: 60

# Log every command that runs
debug: false

How delivery works

Every interval-seconds the plugin asks CraftPay for new commands, runs them on the main thread and reports them as done. Commands that need the player online wait until they join, so nothing is lost if your server is offline when someone buys.

Stuck? Write to mail@craftpay.net