3-D Secure
Challenges on the pay host, the return leg and the fake ACS.
3-D Secure lets the buyer's bank confirm a card payment, usually in its app or with a code. Duevance runs every challenge on its own pages on the pay host, so the acquirer's challenge URL and data never reach your servers.
When a challenge happens
- The bank or the acquirer asks for one: the payment answers
requires_action. - You send
require_3ds: true. - A card is saved (
save_card), or a card stored on its own is charged by the cardholder for the first time: storing a card always asks for a challenge.
API charges
A payment in requires_action carries next_action:
"next_action": { "type": "redirect_to_url", "url": "https://pay.duevance.com/3ds/att_0D4m…" }
- Send the buyer's browser to
next_action.url. The page forwards it to the bank. - The bank sends the buyer back to Duevance, which hands the answer to the acquirer and records
the outcome:
succeeded(orauthorized),declined, orprocessingwhile the acquirer confirms. - The buyer goes on to your
return_urlwithpayment_idadded:https://shop.example/back?payment_id=pay_0D4m…. Without areturn_url, Duevance shows a result page. - Fetch the payment, or wait for its webhook, before you fulfil. The return proves nothing.
The return is safe to repeat: a reload or a form the bank submits twice reads the outcome again and never asks the acquirer twice.
Checkout sessions
On the hosted page none of this needs code: a challenge starts from the page, and the buyer comes
back to the page (declined, or still confirming) or goes straight to your return_url with
session_id (paid).
Pages and headers
The pay host's pages load nothing from third parties, can't be framed (frame-ancestors 'none')
and send a strict Content-Security-Policy, HSTS, Referrer-Policy: no-referrer and
Cache-Control: no-store. Their forms may post only to Duevance, to the acquirers' challenge
hosts, and to your return_url's origin, which the browser checks on the redirect that follows a
payment.
Testing
In test mode the card 4000 0000 0000 3220 asks for a challenge, and the bank is the fake
ACS: a Duevance test page with Approve and Fail authentication buttons. Approve
completes the payment; Fail declines it with authentication_failed. See
Testing.