Sandbox Setup
Configure Fin staging — API key, base URL, and your first API call.
Technical onboarding starts on Fin staging. Complete this setup before writing production code paths.
Prerequisite: Account Activation — you need a staging
x-api-key.
1. Environment variables
Set these in your server or .env (never commit to Git):
DIGETPAY_ENV=staging
DIGETPAY_API_KEY=your_fin_staging_key
DIGETPAY_API_BASE=https://fin-api.digetpay.com/v1Production (later):
DIGETPAY_ENV=production
DIGETPAY_API_KEY=your_production_key
DIGETPAY_API_BASE=https://api.digetpay.com/v12. Verify API key
Test with a minimal payment link request:
curl -s -w "\nHTTP:%{http_code}\n" -X POST "${DIGETPAY_API_BASE}/payment/checkout/intiate" \
-H "x-api-key: ${DIGETPAY_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"merchantOrderId": "SANDBOX-'$(date +%s)'",
"amount": 0.20,
"currency": "SAR",
"customerPhone": "501223324",
"successUrl": "https://fin-admin.digetpay.com/pay/checkout/success",
"failureUrl": "https://fin-admin.digetpay.com/pay/checkout/failure"
}'| HTTP code | Meaning |
|---|---|
201 | Key valid — use redirectUrl from body |
401 | Invalid or wrong-environment key |
400 | Validation error — check customerPhone, amounts |
3. Open the checkout page
Copy redirectUrl from the response and open it in a browser. Complete a test payment with staging test cards (see Fin Staging Guide).
4. Choose your integration track
5. Configure webhooks (recommended)
Before UAT, register a webhook URL — see Webhook Setup Primer.
6. Dashboard access
Log in to Fin staging dashboard: https://fin-admin.digetpay.com
Next steps
Updated about 2 months ago
Did this page help you?
