Integration

API Keys

Managing your HytalePay API key for server integration.

Your API key authenticates your game server with HytalePay to enable automatic item delivery.

Finding Your API Key

  1. Go to Settings > API in your dashboard
  2. Your API key is displayed (masked by default)
  3. Click the eye icon to reveal it
  4. Click Copy to copy it to your clipboard

API Key Security

Your API key is like a password. Keep it secret!

Do's

  • Store it securely in your server configuration
  • Use environment variables when possible
  • Regenerate it if you suspect it's compromised

Don'ts

  • Share it publicly
  • Commit it to version control
  • Post it in Discord or forums
  • Give it to untrusted plugins

Using Your API Key

In the HytalePay Plugin

Add your API key to the plugin configuration:

# plugins/HytalePay/config.yml
api-key: "your-api-key-here"
store-id: "your-store-id"

In Custom Integrations

Include the API key in request headers:

Authorization: Bearer your-api-key-here

Regenerating Your API Key

If your key is compromised or you want to rotate it:

  1. Go to Settings > API
  2. Click Regenerate API Key
  3. Confirm the action
  4. Update your server configuration with the new key
Regenerating your key immediately invalidates the old one. Update your server configuration right away.

Store ID

Along with your API key, you'll need your Store ID for some integrations:

  1. Go to Settings > General
  2. Find your Store ID
  3. Click Copy to copy it

API Documentation

For developers building custom integrations:

  • Base URL: https://api.hytalepay.com
  • Authentication: Bearer token (API key)
  • Format: JSON

Common Endpoints

EndpointMethodDescription
/ordersGETList orders
/orders/{id}GETGet order details
/deliveries/pendingGETGet pending deliveries
/deliveries/{id}/completePOSTMark delivery complete

Troubleshooting

"Invalid API key" error

  • Double-check you copied the full key
  • Ensure no extra spaces or characters
  • Verify you're using the correct store's key

"Unauthorized" error

  • Make sure the Authorization header is correct
  • Format: Authorization: Bearer your-key
  • Check that your key hasn't been regenerated

Delivery not working

  • Verify the plugin is configured correctly
  • Check server logs for errors
  • Ensure your server can reach the HytalePay API