Skip to main content
Cresora Commerce
Testing & Sandbox

3DS2 Simulation

Trigger specific 3D Secure 2 authentication flows in the sandbox.

Use the three_d_secure.simulate field to control 3DS2 behavior in the sandbox without relying on real issuer decisions.

Simulation values

ValueFlowResult
frictionless_successSilent issuer approvalPayment authorized without redirect
challenge_requiredChallenge flowCustomer redirected to complete verification
challenge_failedChallenge attempted, failedPayment declined with three_d_secure_failed
not_enrolledIssuer doesn't support 3DS2Payment processed without 3DS2 protection

Example request

curl
curl -X POST https://api.cresoracommerce.com/v1/payments \
  -H "Authorization: Bearer csk_test_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency": "USD",
    "payment_method": "card",
    "merchant_id": "mrch_xxxxxxxxxx",
    "card": { "number": "4111111111111111", "exp_month": 12, "exp_year": 2028, "cvv": "123" },
    "three_d_secure": {
      "enabled": true,
      "simulate": "challenge_required",
      "return_url": "https://yourapp.com/3ds/complete"
    }
  }'

Challenge flow in the sandbox

When simulate: "challenge_required":

  1. API returns status: "requires_action" with a next_action.redirect_url
  2. Redirect to the URL — the sandbox renders a simple challenge UI
  3. Click Approve to succeed or Deny to fail
  4. Cresora redirects to your return_url with the result

Testing without a redirect handler

To test the frictionless path without needing a working redirect handler:

"three_d_secure": {
  "enabled": true,
  "simulate": "frictionless_success"
}

This completes entirely in the API response with no redirect.