API Credentials
View, copy, and rotate merchant API keys in the dashboard.
Your merchant API key authenticates payment API requests via the x-api-key header. You have a Test API Key for demo payments and a Live API Key for real payments. Both are used with the same API base URL, https://api.digetpay.com/v1.
Portal management APIs use a Bearer token, which is different from the payment API key. For complete authentication details, including Portal Bearer Token usage, token handling, API modes, and security best practices, see Authentication & Credentials.
Where to find keys
Merchant Dashboard → Settings → API Credentials
| Item | Value |
|---|---|
| Merchant Dashboard | pay.digetpay.com (one dashboard for Test and Live) |
| Test API Key | Used for demo payments and Test Cards |
| Live API Key | Used for real payments after go-live approval |
Test and Live keys are separate credentials. Use the Test API Key for development and testing, and use the Live API Key only in your live deployment. The API base URL is the same for both.
How merchants receive credentials
| Channel | When |
|---|---|
| Onboarding | Issued after KYC — Account Activation |
| Dashboard | View masked key; rotate to reveal new key once |
| Portal API | GET /merchant/account/credentials |
Retrieve credentials (Portal API)
sequenceDiagram
autonumber
participant Merchant as Your Backend
participant DigetPay as DigetPay Portal API
Merchant->>DigetPay: GET /merchant/account/credentials<br/>Authorization: Bearer {portal_token}
DigetPay-->>Merchant: apiKeyMasked, apiKeyPlain?, issuedAt, environment
Rotate API key
sequenceDiagram
participant Merchant as Merchant Dashboard
participant DigetPay as DigetPay Portal API
participant Prod as Your Servers
Merchant->>DigetPay: POST /merchant/account/credentials/rotate
DigetPay-->>Merchant: apiKeyPlain (one-time)
Merchant->>Prod: Update secrets manager
Critical:
apiKeyPlainis shown once. Store immediately in your secrets manager.
Using your API key
{
"headers": {
"x-api-key": "YOUR_TEST_OR_LIVE_API_KEY",
"Content-Type": "application/json"
}
}| Rule | Detail |
|---|---|
| Server-side only | Never embed in mobile apps or browser JavaScript |
| Test and Live | Keep separate keys; never use the Live API Key for development |
| Same base URL | Switch the key to switch modes; do not change the API base URL |
| Rotation | Update servers before revoking old key |
Related
Updated about 2 months ago

