Get Your API Keys

Where to Find Your Keys

  1. Log in to your Inflow Dashboard.
  2. Go to Settings → Developers.
  3. Click Create API key for your private key, and Create public key for your SDK public key. The private key is shown only once, so copy it straight away. See Developers.

There are two kinds of keys:

KeyHeaderUse
Private Key (inflow_prod_... / inflow_sandbox_...)X-Inflow-Api-KeyServer-side API calls
Public Key (inflow_pub_prod_... / inflow_pub_sandbox_...)X-Inflow-Public-KeyClient-side SDK

When to Use Each Key

Private Key — Server-Side

Use your private key for any API call that creates, modifies, or reads resources:

  • Creating payments
  • Managing subscriptions
  • Setting up webhooks
  • Listing transactions
  • Issuing refunds

Marketplace platforms use the same private key for Connect. After Connect is enabled, your platform key can create sub-merchants and call merchant routes on behalf of a seller with the X-On-Behalf-Of header.

curl https://api.inflowpay.com/api/payment \
  -H "X-Inflow-Api-Key: inflow_prod_your_key"

Public Key — Client-Side

Use your public key only for the Inflow SDK (card payment form):

const provider = new InflowPayProvider({
  config: { publicKey: 'inflow_pub_your_key' }
});

The public key has limited permissions — it can only interact with the SDK endpoints.

Rotating Keys

Keys can't be regenerated. To replace a key, create a new one and revoke the old one in Settings → Developers:

  1. Click Create API key (or Create public key) to create the new key.
  2. Update your integration with the new key.
  3. Click Revoke next to the old key and confirm.

Revoking a key invalidates it instantly. Make sure nothing still uses it before you revoke it. See Rotating a key.

Environment Setup

We recommend using environment variables to store your keys:

# .env file
INFLOW_PRIVATE_KEY=inflow_prod_your_key
INFLOW_PUBLIC_KEY=inflow_pub_your_key
// Node.js
const INFLOW_KEY = process.env.INFLOW_PRIVATE_KEY;
// React / Next.js (public key only)
const provider = new InflowPayProvider({
  config: { publicKey: process.env.NEXT_PUBLIC_INFLOW_PUBLIC_KEY }
});

Did this page help you?