Unified Checkout
with Sale and
Decision Manager

This section contains the capture context and JavaScript examples that can be used to integrate
Unified Checkout
into your e-commerce page. You can use these examples to collect your consumer's payment information and process a sale while also invoking the
Decision Manager
fraud solution. Before the sale is initiated,
Decision Manager
is invoked for fraud screening.
For information on the capture context, see Capture Context API.

Example:
Unified Checkout
with Sale and
Decision Manager

Light Dark
Capture Context Request
1234567891011121314151617181920212223242526272829303132333435363738
{"clientVersion": "0.26", "targetOrigins": [ "https://yourCheckoutPage.com" ], "allowedCardNetworks": [ "VISA", "MASTERCARD", "AMEX" ], "allowedPaymentTypes": [ "APPLEPAY", "CLICKTOPAY", "GOOGLEPAY", "PAZE" ], "country": "US", "locale": "en_US", "captureMandate": { "billingType": "FULL", "requestEmail": true, "requestPhone": true, "requestShipping": true, "shipToCountries": [ "US", "GB" ], "showAcceptedNetworkIcons": true }, "orderInformation": { "amountDetails": { "totalAmount": "21.00", "currency": "USD" } }, "completeMandate": { "type": " CAPTURE", "decisionManager": true }}
JavaScript
123456789101112131415161718192021222324
<="text/javascript"> const sidebar = true; const captureContext = document.getElementById("captureContext").value; const showArgs = { containers: { paymentSelection: "#buttonPaymentListContainer" } }; async function launchCheckout() { try { const accept = await Accept(captureContext); const up = await accept.unifiedPayments(sidebar); const tt = await up.show(showArgs); const completeResponse = await up.complete(tt); console.log(completeResponse); // merchant logic for handling complete response } catch (error) { // merchant logic for handling issues console.error("something went wrong: " + error); } } // Call the function launchCheckout(); </>