Developer platform

API keys

ForgePay API keys authenticate server-to-server merchant API requests.

ForgePay is not a bank. ForgeCredit is an internal settlement unit for services available in the ForgePay ecosystem.

How to create an API key

Open Dashboard > Merchant API, register a merchant profile if needed, then create an API key. ForgePay displays the raw key only once and stores only a hash.

  • Copy the key immediately after creation.
  • Keep the key in server-side environment variables.
  • Rotate keys when a teammate leaves or a deployment secret may be exposed.

Use the key

Send the API key in the `Authorization` header as a bearer token.

curlbash
curl http://localhost:3000/api/v1/balance \
  -H "Authorization: Bearer fp_test_xxxxxxxxxxxxxxxxxxxxx"
JavaScriptjavascript
const response = await fetch("http://localhost:3000/api/v1/balance", {
  headers: {
    Authorization: "Bearer fp_test_xxxxxxxxxxxxxxxxxxxxx"
  }
});

const balance = await response.json();