Account Setup
Before you write any code, collect two credentials from your AccruPay dashboard and connect at least one payment provider.
1. Get your credentials
Open the AccruPay dashboard and navigate to Settings → API Keys.
| Credential | Where it goes | Header / Prop |
|---|---|---|
| API Secret | Backend only — never in browser code | accrupay-api-secret |
| Merchant Public ID | Frontend — safe to expose in client bundles | merchantPublicId |
Never include the API Secret in frontend code, client bundles, or public repositories. It authenticates all backend operations on your behalf.
API Secret
Used by @accrupay/node and raw GraphQL calls from your server:
import AccruPay from '@accrupay/node';
const sdk = new AccruPay({
apiSecret: process.env.ACCRUPAY_API_SECRET, // never hardcode
});
Merchant Public ID
Used by @accrupay/react in your checkout frontend:
<AccruPay merchantPublicId="your-merchant-public-id" transactionSessionId={sessionId}>
{/* payment fields */}
</AccruPay>
2. Connect a payment provider
AccruPay routes payments through your own payment provider accounts — you keep your existing provider relationships and pricing.
To add a provider:
- Go to Settings → Payment Providers in the AccruPay dashboard.
- Select a supported provider.
- Enter the credentials from your provider account (API keys, merchant ID, etc.).
- Save. AccruPay validates the credentials and marks the provider as active.
For provider-specific credential requirements, see the Provider Integrations section in the sidebar.
If you don't have a payment provider account yet, connect your sandbox credentials first. Most providers offer free sandbox environments — you can complete your full integration and testing before going live.
3. Sandbox vs. production
AccruPay uses the same API surface in both environments. Sandbox credentials (both your AccruPay API Secret and your provider sandbox keys) keep all transactions isolated from real money.
| Sandbox | Production | |
|---|---|---|
| AccruPay API Secret | Sandbox key from dashboard | Production key from dashboard |
| Provider credentials | Provider sandbox / test keys | Provider live keys |
| Real money | No | Yes |
Node SDK environment | 'sandbox' | 'production' |
React SDK environment | "sandbox" | "production" |
Use sandbox throughout development and CI. Switch to production only when you are ready to go live — see the Go Live checklist.