Fin Staging Guide

Validate your integration on the Fin staging environment.

Use the Fin staging environment to validate your integration before production. This guide covers the recommended test flow, checklist, and common mistakes.

📘

Start here: Quick Start if you have not created a payment yet.

🚧

Staging only: Fin staging processes test traffic. Do not use production API keys or real customer PII during testing.


Environment

ItemValue
API base URLhttps://fin-api.digetpay.com/v1
Checkout pagehttps://fin-admin.digetpay.com/pay/checkout
Auth headerx-api-key: YOUR_STAGING_API_KEY
{
  "environment": "fin-staging",
  "apiBaseUrl": "https://fin-api.digetpay.com/v1",
  "checkoutUrl": "https://fin-admin.digetpay.com/pay/checkout",
  "headers": {
    "x-api-key": "YOUR_STAGING_API_KEY"
  }
}

Test Cards

Use the DigetPay test cards to simulate approved, declined, and 3D Secure card payment scenarios while testing on the Fin Staging environment.

Note: Apple Pay testing follows a separate validation process and does not use the test card numbers listed on the Test Cards page. See the Apple Pay Testing guide for details.


Recommended test flow

  1. Create Payment Link — amount 0.20 SAR, valid customerPhone (e.g. 501223324).
  2. Open redirectUrl and complete payment on hosted checkout.
  3. Obtain the gateway transaction ID (UUID) from status API or webhook.
  4. Query Transaction Status — verify transactionStatus: SUCCESS.
  5. Process Refund — verify result: accepted and refundStatus updates.

Pass criteria: Full flow succeeds when create → pay → status SUCCESS → refund accepted all work with JSON payloads documented in Quick Start.

Sample test payloads

Create payment link:

{
  "merchantOrderId": "TEST-20260619-001",
  "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"
}

Status check:

{
  "query": {
    "id": "2232e99b-0257-47d5-bbfd-022c8951767f"
  }
}

Refund:

{
  "transactionId": "2232e99b-0257-47d5-bbfd-022c8951767f",
  "amount": 0.20
}

Validation scenarios

Complete the following validation scenarios before moving to production.

ScenarioExpected ResultRelated Guide
Create Payment LinkReturns 201 with id and redirectUrl.Quick Start
Complete Hosted CheckoutPayment completes successfully on the hosted checkout page.Quick Start
Verify Transaction StatusStatus API returns SUCCESS with the correct transaction details.Transaction Status
Process Full RefundRefund request is accepted successfully.Process Refund
Process Partial RefundPartial refund is accepted with the requested amount.Process Refund
Validate Apple Pay (if enabled)Apple Pay payment completes successfully on Fin Staging.Apple Pay Testing
Invalid API KeyAPI returns 401 Unauthorized.API Reference
Missing Required FieldsAPI returns 400 Bad Request.API Reference
❗️

Blocker: If redirectUrl points to a production partner domain instead of fin-admin.digetpay.com, stop testing and contact DigetPay — your environment may be misconfigured.


Common mistakes

MistakeFix
Using /payment/checkout/sessionUse /payment/checkout/intiate on Fin
Missing customerPhoneRequired on create — use 501223324 format
Using session ID for status/refundUse gateway transaction ID
Using numeric payment ID for refundUse gateway UUID format
Calling POST /payment/s2s/statusUse GET /payment/checkout/status on Fin
🚧

Important: The checkout session ID from Create Payment Link is not valid for status or refund APIs.


Troubleshooting

SymptomLikely causeAction
401 — merchant not foundAPI key not synced to merchantContact DigetPay support
400 — customerPhoneMissing or invalid phoneSend customerPhone (e.g. 501223324)
Wrong checkout domain in redirectEnvironment misconfigurationExpect fin-admin.digetpay.com on Fin
Apple Pay — public key mismatchProcessing cert not configuredContact DigetPay support
Refund / status failsWrong ID typeUse gateway transaction UUID

When reporting issues to support, include your merchantOrderId, HTTP status code, and the JSON error response body (redact API keys).


Tools



Did this page help you?