Process 3D Secure Return Response
Processes the return response from 3D Secure verification and completes payment. This endpoint is called when the bank redirects back after authentication.
Return Parameters: Gateway-specific parameters are passed back from the 3D Secure provider. Common parameters include:
three_d_secure: Verification status (boolean)success: Transaction success status (boolean)md: Merchant data passed through 3D Secure flowxid: Transaction identifier from 3D Secureeci: Electronic Commerce Indicatorcavv: Cardholder Authentication Verification ValuemdStatus: MD status code from providerAdditional gateway-specific parameters
MD Status Validation:
Gateway validates the
mdStatusand other response parametersEach gateway has specific validation logic via
is_md_status_valid()Failed validation returns user to payment page with error
Transaction Creation:
Successful 3D Secure verification creates order and transaction
Transaction ID format:
3D_RETURN_{order_number}_{suffix}Sensitive parameters are filtered from transaction log
Cached Card Retrieval:
Card details are retrieved from cache using pre-order hash
If cache expired, payment fails and user must restart
Successful payment clears cached card data
Save Card After 3D Secure:
If user chose to save card, it's tokenized after successful payment
Save operation happens asynchronously via Celery task
Next Pages:
Success:
ThankYouPage(order completed)Failure: Redirects back to
CreditCardConfirmationPagewith error
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
3D Secure verification status. Must be true for successful verification.
Transaction success status. Must be true for successful transaction.
Merchant data passed through 3D Secure flow
Transaction identifier from 3D Secure provider
Electronic Commerce Indicator from 3D Secure
Cardholder Authentication Verification Value
LiqPay-specific token (gateway-specific)
Status from payment gateway
Payment identifier from gateway
Conversation data from gateway
Conversation identifier from gateway
MD status code from 3D Secure provider. Different values indicate authentication success/failure. Gateway-specific validation logic.
Additional gateway-specific response data
3D Secure verification processed
POST /orders/checkout/?page=CreditCardThreeDSecurePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 146
"three_d_secure=true&success=true&md='merchant_data_hash'&xid='transaction_id_12345'&eci='05'&cavv='cavv_value_base64'&mdStatus='1'"3D Secure verification processed
{
"context_list": [
{
"page_name": "ThankYouPage",
"page_slug": "thankyoupage",
"page_context": {
"order": {
"pk": 5001,
"number": "ORD-2026-0001",
"status": "confirmed"
}
}
}
],
"pre_order": {
"basket": {
"pk": 123,
"total_amount": "150.00"
},
"order": {
"pk": 5001,
"number": "ORD-2026-0001"
},
"total_amount": "165.59",
"total_amount_with_interest": "165.59",
"currency_type_label": "USD"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

