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 For | Description |
|---|---|
| Custom Checkout | Build your own payment page and customer experience |
| Mobile Applications | Native Android and iOS payment flows |
| Subscription Platforms | Token-based recurring payments |
| Marketplace Solutions | Complete payment lifecycle control |
| Advanced Merchants | Authorization, 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/jsonThe 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
| Step | Description |
|---|---|
| 1 | Generate the request hash |
| 2 | Submit a Direct Sale request |
| 3 | Handle 3-D Secure authentication if required |
| 4 | Receive the payment webhook |
| 5 | Verify the transaction status |
| 6 | Capture or Void the transaction (optional) |
| 7 | Process recurring payments (optional) |
Available APIs
Create a card payment.
Retrieve the latest payment status.
Capture an authorized transaction.
Cancel an authorization before settlement.
Charge a previously saved payment token.
Learn how to generate the MD5 request hash.
API Endpoints
| API | Method | Endpoint |
|---|---|---|
| Direct Sale | POST | /payment/s2s/sale |
| Transaction Status | POST | /payment/s2s/status/{transactionId} |
| Capture | POST | /payment/s2s/capture |
| Void | POST | /payment/s2s/void |
| Recurring | POST | /payment/s2s/recurring |
Environment URLs
| Environment | Base URL |
|---|---|
| Fin Staging | https://fin-api.digetpay.com/v1 |
| Production | https://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
htmlContentis returned, render it exactly as received and wait for the authentication flow to complete before checking the transaction status.
Related Guides
Updated 14 days ago
