JavaScript Example: Processing a Payment
Payment is initiated when
Unified Checkout
captures the customer's
payment information by calling the unifiedPayment.complete()
function and passing the transient token.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); }}
When you include this in your capture context,
Unified Checkout
is
leveraged to initiate payment. Alternatively, you can call the payment APIs
directly. See Authorizations with a Transient Token.