Hosted Redirect Initiate

Gateway-hosted redirect with optional split payments. Requires DigetPay DG… format API key.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a hosted checkout session and returns a payment URL that redirects the customer to the DigetPay hosted checkout page.

📘

Recommended API: This is the primary endpoint for Hosted Checkout integrations. After creating the payment session, redirect the customer to the returned redirectUrl.


Endpoint

MethodPOST
URL{baseUrl}/payment/checkout/intiate
Authenticationx-api-key (Required)

Fin Staging Base URL

https://fin-api.digetpay.com/v1
🚧

Legacy endpoint name: The endpoint path is intentionally spelled intiate. Do not replace it with initiate.


Integration Flow

sequenceDiagram
    autonumber

    participant Merchant as Your Server
    participant API as DigetPay API
    participant Customer
    participant Checkout as Hosted Checkout

    Merchant->>API: POST /payment/checkout/intiate
    API-->>Merchant: id + redirectUrl

    Merchant->>Customer: Redirect

    Customer->>Checkout: Complete payment

    Checkout-->>Customer: successUrl / failureUrl

Request Body

ParameterTypeRequiredDescription
merchantOrderIdstringUnique merchant order reference.
amountnumberPayment amount. Minimum 0.01.
currencystringNoCurrency code. Default SAR.
customerNamestringNoCustomer name shown during checkout.
customerEmailstringNoCustomer email address.
customerPhonestringCustomer mobile number. Required for Apple Pay.
successUrlURLRedirect after successful payment.
failureUrlURLRedirect after failed payment.
❗️

Important: customerPhone is required. Requests without a valid phone number return 400 Bad Request and Apple Pay will not be available.


Phone Number Format

FormatExample
Local501223324
With leading zero0501223324

Request Example

{
  "merchantOrderId": "PAY-1781872369616",
  "amount": 0.20,
  "currency": "SAR",
  "customerName": "Mohamed Ashour",
  "customerEmail": "[email protected]",
  "customerPhone": "501223324",
  "successUrl": "https://fin-admin.digetpay.com/pay/checkout/success",
  "failureUrl": "https://fin-admin.digetpay.com/pay/checkout/failure"
}

Store merchantOrderId in your system before creating the payment session so it can be matched with webhook notifications and transaction status responses.


Responses

{
  "id": "70471003-64ee-4ae7-a639-e607b45e890b",
  "redirectUrl": "https://fin-admin.digetpay.com/pay/checkout?sessionId=70471003-64ee-4ae7-a639-e607b45e890b"
}

Response Fields

FieldDescription
idCheckout session identifier.
redirectUrlHosted checkout page where the customer completes payment.
🚧

The returned id is the checkout session ID, not the payment transaction ID.

To query payment status or process refunds, use the gateway transaction ID returned after payment completion.

See Transaction Identifiers for more details.


Session Behavior

ItemValue
Session Lifetime48 Hours
Initial StatusPENDING
After Successful PaymentPAID
Payment MethodsCards, Mada, Apple Pay, Saved Cards

The returned redirectUrl points to the DigetPay hosted checkout page. On Fin Staging the domain is:

https://fin-admin.digetpay.com/pay/checkout

Best Practices

  • Generate a unique merchantOrderId for every payment.
  • Always send customerPhone.
  • Never consider the redirect as the final payment result.
  • Verify every payment using the Transaction Status API or Webhooks.
  • Store the gateway transaction ID after payment for refunds and future operations.

Body Params
string
required
number
required
customerDetails
object
required
string
required
string
required
suppliers
array of objects
suppliers
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json