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

ItemValue
Merchant Dashboardpay.digetpay.com (one dashboard for Test and Live)
Test API KeyUsed for demo payments and Test Cards
Live API KeyUsed 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

ChannelWhen
OnboardingIssued after KYC — Account Activation
DashboardView masked key; rotate to reveal new key once
Portal APIGET /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: apiKeyPlain is 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"
  }
}
RuleDetail
Server-side onlyNever embed in mobile apps or browser JavaScript
Test and LiveKeep separate keys; never use the Live API Key for development
Same base URLSwitch the key to switch modes; do not change the API base URL
RotationUpdate servers before revoking old key

Portal API Reference →


Related


Did this page help you?