1 2 3 4 5
Keys SDK Call Hooks Live
Step 1 of 5 ยท ~5 min

Create Your Account & Get API Keys

Before writing any code, you need a PaymentsAPI account and your API keys. This step covers account creation, key types, and how to store keys securely from day one.

1
Create your account
  1. Go to dashboard.paymentsapi.dev and click Create Account
  2. Verify your email address
  3. Complete the business profile form (required for live access)
  4. You now have sandbox access immediately โ€” live access is enabled after KYB review
2
Understand key types
Key type Prefix What it can do Where to use
Secret key sk_test_ / sk_live_ Full API access โ€” create transfers, manage accounts Server-side only
Publishable key pk_test_ / pk_live_ Tokenize account data only โ€” no transfer creation Safe for client-side
โš  Never expose your secret key
If sk_live_ appears in version control, public logs, or client-side code โ€” rotate it immediately from the dashboard. Leaked live keys grant full transfer creation access.
3
Retrieve your API keys from the dashboard
  1. In the dashboard, go to Settings โ†’ API Keys
  2. Your sk_test_ key is visible immediately โ€” copy it now
  3. Your webhook secret (whsec_) is under Settings โ†’ Webhooks โ€” you'll need it in Step 4
4
Store your keys securely before writing any code

Create a .env file in your project root and add it to .gitignore before your first commit.

# .env โ€” add this to .gitignore immediately PAYMENTS_SECRET_KEY=sk_test_[your_secret_key_here] PAYMENTS_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxxxxx PAYMENTS_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxx # .gitignore .env .env.local .env.*.local
For production: use a secrets manager
In production, store your sk_live_ key in AWS Secrets Manager, GCP Secret Manager, or a CI/CD secrets store โ€” never in environment files on a server.
Step 1 Checklist
โ† Overview