Show a Confirmation Page


Important: This feature is recommended only when absolutely necessary. Adding additional steps to the checkout experience can result in reduced conversion and a lower transaction completion rate.

Show the buyer a confirmation page before you capture the funds from a transaction.

In the script tag, add commit=false to show a Continue button instead of Pay Now in the Checkout flow.


In the onApprove callback, show your buyer a confirmation page. Use the payment and buyer details from actions.order.get().

Note: For the basic integration, you complete this step directly on the client side. You can also make a call directly from your server to PayPal to get transaction details.

  onApprove: function (data, actions) {

    // Get the order details
    return actions.order.get().then(function (orderDetails) {

      // Show a confirmation using the details from orderDetails
      // Then listen for a click on your confirm button
        .addEventListener('click', function () {

          // Capture the transaction funds
          return actions.order.capture().then(function () {
            // Show a confiurmation to the buyer
            alert('Transaction complete!');

For the full list of details you can retrieve from actions.order.get(), read the Orders API reference.