On This Page
Unified Checkout Integration without Service Orchestration
Unified Checkout Integration
without Service OrchestrationThis section contains the capture context and JavaScript examples that can be used to
integrate
Unified Checkout Integration
into your e-commerce page. You can use these
examples to collect your consumer's payment information. Payment processing and service
orchestration are completed through the back end of the integrator.For information on the capture context, see Capture Context API.
Example: Unified Checkout Integration without Service
Orchestration
Unified Checkout Integration
without Service
OrchestrationCapture Context Request
{ "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" } } }
JavaScript
<script type="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); console.log(tt); // merchant logic for passing the Transient token to their backend for service orchestration } catch (error) { // merchant logic for handling issues console.error("something went wrong: " + error); } } // Call the function launchCheckout(); </script>