Embedded Integration Overview

Server-side card payments, capture, void, and recurring on your checkout UI.

Embedded Integration gives you complete control over your checkout experience by allowing your backend to communicate directly with DigetPay APIs. This integration supports direct sales, authorization & capture, void transactions, recurring payments, and server-to-server payment management.

🚧

PCI DSS Required

Your application processes cardholder data directly. You are responsible for PCI DSS compliance (typically SAQ D or equivalent). If you don't require a fully customized checkout, we recommend using Hosted Checkout.

❗️

Backend Only

Never submit card information directly from browser JavaScript. Card details, request hash generation, and all DigetPay API calls must be performed from your secure backend.

📘

Need code samples?

PHP, Node.js, Python, and Java examples are available at the bottom of this page.


When to use Embedded Integration

Recommended ForDescription
Custom CheckoutBuild your own payment page and customer experience
Mobile ApplicationsNative Android and iOS payment flows
Subscription PlatformsToken-based recurring payments
Marketplace SolutionsComplete payment lifecycle control
Advanced MerchantsAuthorization, Capture, Void, and Recurring payments

Payment Flow

sequenceDiagram
    autonumber

    participant Customer
    participant Merchant as Your Backend
    participant DigetPay
    participant Gateway

    Customer->>Merchant: Enter card details

    Merchant->>Merchant: Generate Request Hash

    Merchant->>DigetPay: POST /payment/s2s/sale

    DigetPay->>Gateway: Process payment

    Gateway-->>DigetPay: APPROVED / DECLINED / 3DS

    DigetPay-->>Merchant: Payment response

    opt 3DS Required
        Merchant->>Customer: Render htmlContent
    end

    opt Webhook
        DigetPay-->>Merchant: Payment notification
    end

    Merchant->>DigetPay: Check transaction status

    opt Authorized transaction
        Merchant->>DigetPay: Capture or Void
    end

    opt Saved card
        Merchant->>DigetPay: Recurring payment
    end

Authentication

All Embedded Integration endpoints require the following request headers:

x-api-key: YOUR_API_KEY
Content-Type: application/json

The Direct Sale API additionally requires a request hash generated by your backend before sending the request.

Hash Formula

MD5(
UPPERCASE(
reverse(customerEmail)
+
apiKey
+
reverse(first6 + last4)
)
)

Generate the request hash on your backend immediately before calling the Direct Sale API. Never expose your API key or hash generation logic to the client.


Integration Steps

StepDescription
1Generate the request hash
2Submit a Direct Sale request
3Handle 3-D Secure authentication if required
4Receive the payment webhook
5Verify the transaction status
6Capture or Void the transaction (optional)
7Process recurring payments (optional)

Available APIs


API Endpoints

APIMethodEndpoint
Direct SalePOST/payment/s2s/sale
Transaction StatusPOST/payment/s2s/status/{transactionId}
CapturePOST/payment/s2s/capture
VoidPOST/payment/s2s/void
RecurringPOST/payment/s2s/recurring

Environment URLs

EnvironmentBase URL
Fin Staginghttps://fin-api.digetpay.com/v1
Productionhttps://api.digetpay.com/v1

Code Examples


Best Practices

Recommended implementation

  • Generate the request hash on your backend.
  • Never expose card data or API keys to the browser.
  • Process payment notifications using webhooks.
  • Verify payment status before fulfilling any order.
  • Store transaction IDs for future capture, void, refund, or recurring operations.
🚧

3-D Secure

Some card issuers require 3-D Secure authentication. When htmlContent is returned, render it exactly as received and wait for the authentication flow to complete before checking the transaction status.


Related Guides



Did this page help you?