CardEase 3DS Server Integration
Server-side 3DS implementation for merchants who prefer to handle 3DS authentication logic on their own server rather than via client-side Gateway.js.
When to Use Server-Side 3DS
- Full control over the authentication flow
- Server-rendered checkout (not a SPA)
- Existing 3DS infrastructure to integrate with
- Custom frictionless vs. challenge handling
3DS2 Flow
- POST transaction and card data to the 3DS server
- Server evaluates risk and returns frictionless or challenge
- Frictionless: authentication completes, returns ECI + CAVV
- Challenge: customer redirected to issuer challenge page
- Submit ECI + CAVV with transaction to gateway API
Authentication Request
$post = array(
'security_key' => YOUR_PRIVATE_KEY,
'action' => 'initiate_3ds',
'payment_token' => $payment_token,
'amount' => '49.99',
'currency' => 'USD',
'browser_info' => json_encode([
'acceptHeader' => $_SERVER['HTTP_ACCEPT'],
'colorDepth' => 24,
'language' => 'en-US',
'screenHeight' => 900,
'screenWidth' => 1440,
'userAgent' => $_SERVER['HTTP_USER_AGENT'],
]),
'notification_url' => 'https://yoursite.com/3ds-callback',
);
$result = gateway_post('https://secure.cyogate.net/api/3ds.php', $post);