API ReferenceWooCommerceSDKssoonWebhookssoon

Account

Create an API key

POST/api/merchants/api-keys

Generate a new API key for server-to-server calls. The plaintext key is returned exactly once.

  • Dashboard-only (merchant JWT) — a key cannot mint sibling keys.
  • Save the returned api_key immediately. Listing keys afterwards returns only a preview.
  • An API key authenticates as your whole merchant account. Keep it server-side; never ship it to a browser or a mobile app.

Authentication

Requires a dashboard session JWT in the Authorization: Bearer … header.

POST/api/merchants/api-keys
curl --request POST "https://api.trevi.cash/api/merchants/api-keys" \
  --header "Authorization: Bearer $TREVI_JWT"
200Sample response
{
  "success": true,
  "api_key": "btpay_live_…",
  "key_id": "key_abc123",
  "warning": "Save this API key now. You won't be able to see it again."
}
Was this page helpful?