For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 flow

  • xid: Transaction identifier from 3D Secure

  • eci: Electronic Commerce Indicator

  • cavv: Cardholder Authentication Verification Value

  • mdStatus: MD status code from provider

  • Additional gateway-specific parameters

MD Status Validation:

  • Gateway validates the mdStatus and other response parameters

  • Each 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 CreditCardConfirmationPage with error

post
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Body
three_d_secureboolean · enumRequired

3D Secure verification status. Must be true for successful verification.

Possible values:
successboolean · enumRequired

Transaction success status. Must be true for successful transaction.

Possible values:
mdstringOptional

Merchant data passed through 3D Secure flow

xidstringOptional

Transaction identifier from 3D Secure provider

ecistringOptional

Electronic Commerce Indicator from 3D Secure

cavvstringOptional

Cardholder Authentication Verification Value

liqpay_tokenstringOptional

LiqPay-specific token (gateway-specific)

statusstringOptional

Status from payment gateway

paymentIdstringOptional

Payment identifier from gateway

conversationDatastringOptional

Conversation data from gateway

conversationIdstringOptional

Conversation identifier from gateway

mdStatusstringOptional

MD status code from 3D Secure provider. Different values indicate authentication success/failure. Gateway-specific validation logic.

bodyobjectOptional

Additional gateway-specific response data

Responses
200

3D Secure verification processed

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CreditCardThreeDSecurePage
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'"
200

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?