PCI DSS & Card Data Handling
Embedded Integration gives your application direct control over the payment experience, but it also means your systems may process sensitive cardholder data.
When using DigetPay Embedded Integration, you are responsible for understanding and meeting the PCI DSS requirements applicable to your payment implementation.
Important
Do not use Embedded Integration unless your organization is prepared to handle cardholder data securely and meet the applicable PCI DSS requirements.
If you do not need to collect or process card data directly, use Hosted Checkout instead.
PCI DSS Scope
With Embedded Integration, card data is collected as part of your own payment experience before it is sent to DigetPay from your secure backend.
This can place your systems within PCI DSS scope.
The exact PCI DSS requirements that apply depend on your architecture, data flow, storage, access controls, and payment implementation. Your organization is responsible for determining the appropriate compliance requirements for its environment.
Hosted Checkout alternative
With Hosted Checkout, card entry takes place on DigetPay infrastructure. Your application redirects the customer to the DigetPay checkout page and does not directly handle card data.
Card Data You Must Protect
Sensitive payment data can include:
| Data | Example | Handling Requirement |
|---|---|---|
| Primary Account Number (PAN) | 411111******1111 | Treat as sensitive cardholder data |
| Full card number | 4111111111111111 | Never expose or store unless explicitly permitted and protected |
| CVV / CVC | 123 | Must not be stored after authorization |
| Expiry date | 12/28 | Protect when handled with cardholder data |
| Cardholder name | Ahmed Ali | Protect according to your payment data policy |
| Authentication data | 3-D Secure information | Handle only as required for the payment flow |
Never store CVV or CVC.
Sensitive authentication data must not be retained after authorization.
Recommended Card Data Flow
Use the following flow when implementing Embedded Integration:
sequenceDiagram
autonumber
participant Customer
participant App as Your Checkout
participant Backend as Your Secure Backend
participant DigetPay
participant Gateway
Customer->>App: Enter card details
App->>Backend: Send payment data over HTTPS
Backend->>Backend: Generate request hash
Backend->>DigetPay: POST /payment/s2s/sale
DigetPay->>Gateway: Process payment
Gateway-->>DigetPay: Payment result
DigetPay-->>Backend: Response
Backend-->>App: Payment result
Note over Backend: Do not persist PAN or CVV
Card data must not be sent directly from the browser to DigetPay using your merchant API key.
Backend-Only Payment Processing
All of the following operations must be handled by your secure backend:
- Storing the DigetPay
x-api-key - Generating the request hash
- Calling Embedded Integration APIs
- Processing direct sale requests
- Handling transaction status
- Processing capture and void requests
- Processing recurring payment requests
Your API key must never be exposed in:
- Browser JavaScript
- Mobile application source code
- Public repositories
- Client-side configuration files
- Screenshots or support tickets
- Public documentation
Secure Your Payment Endpoint
Your payment endpoint should:
- Use HTTPS.
- Authenticate and authorize requests where applicable.
- Restrict access to approved application components.
- Validate incoming request data.
- Protect against unauthorized access.
- Prevent sensitive payment data from being written to logs.
- Return only the information required by the client.
- Avoid storing raw payment request or response bodies.
Recommended approach
Keep the payment-processing backend separate from publicly accessible application services where possible, and limit access to payment systems to authorized personnel and services.
Do Not Log Card Data
Application logs, debugging tools, monitoring systems, analytics platforms, and error-tracking services must not capture sensitive card data.
Do not log:
Full card number
CVV / CVC
Complete payment request bodies containing card data
Raw request headers containing credentials
Full API keys
Full authentication tokensWhen troubleshooting, mask sensitive values.
Example
Do not log:
{
"cardNumber": "4111111111111111",
"cvv": "123"
}Use masking instead:
{
"cardNumber": "411111******1111"
}Secure Credential Handling
Your DigetPay credentials are sensitive and must be protected.
Merchant API Key
Used to authenticate payment API requests:
x-api-key: YOUR_MERCHANT_API_KEYRequest Hash
The Direct Sale API requires a request hash generated by your backend.
See Request Hash Generation for the implementation formula.
Do not expose your API key or hash generation logic to:
- Browser code
- Mobile applications
- Frontend configuration
- Public source repositories
Store credentials using environment variables or a secure secrets-management solution.
Token-Based Future Payments
Use DigetPay payment or recurring tokens for supported future payment scenarios instead of retaining raw card data.
For recurring payments:
- The customer completes the initial payment.
- DigetPay generates a recurring token.
- Store the token securely on your backend.
- Use the token for supported future recurring charges.
Preferred approach
Store the DigetPay token or recurring token, not the customer's raw card number or CVV.
See Recurring Payments for the recurring payment flow.
3-D Secure
Some payments require 3-D Secure authentication.
When DigetPay returns htmlContent:
- Return the required authentication content to the customer payment flow.
- Render the authentication flow exactly as required.
- Wait for the authentication flow to complete.
- Verify the final transaction status using the Status API or webhook.
- Do not treat the initial Direct Sale response alone as the final payment result when additional authentication is required.
Security Checklist
Before going live with Embedded Integration, verify that:
- Your PCI DSS obligations have been reviewed.
- Card data is transmitted only over HTTPS.
- The DigetPay API key is stored server-side.
- Request hashes are generated only on your backend.
- PAN and CVV are not written to logs.
- CVV is never stored after authorization.
- Raw card data is not stored unless explicitly permitted by your PCI DSS controls and payment architecture.
- Access to payment systems is restricted.
- Production credentials are stored securely.
- Recurring tokens are stored securely.
- Sensitive credentials are masked in logs.
- Payment results are verified before orders are fulfilled.
- The implementation has been tested in Fin Staging before production deployment.
Hosted Checkout vs Embedded Integration
| Hosted Checkout | Embedded Integration | |
|---|---|---|
| Card entry | DigetPay checkout page | Your payment experience |
| Your application handles card data | No | Yes |
| PCI DSS scope | Typically reduced | Higher |
| Checkout customization | Limited | Full control |
| Request hash | Not required | Required for Direct Sale |
| Recommended for | Most integrations | Advanced/custom payment flows |
If you do not require a fully customized payment form, we recommend Hosted Checkout to reduce the amount of sensitive payment data handled by your application.
Related Documentation
Complete Embedded Integration workflow.
Generate the Direct Sale request hash.
Use tokens for supported recurring charges.
Verify the final payment result.
Use DigetPay-hosted card collection.
Test your integration before production.
Updated about 1 month ago

