Show cancellation page

DocsCurrentADVANCED

Last updated: Aug 12th, 6:21am

Show a page to your payers to confirm that the payment was cancelled.

Know before you code

Required
Advanced Checkout

Complete the steps in Get started to get your sandbox account login information and access token from the Developer Dashboard.

This feature modifies an existing advanced Checkout integration and uses the following:

Get startedAdvanced Checkout

Optional
Explore PayPal APIs with Postman

You can use Postman to explore and test PayPal APIs. Learn more in our Postman guide.

Display a cancellation page

Add the onCancel function to the JavaScript that renders the PayPal buttons to show a cancellation page when a payer cancels a payment:

    1paypal.Buttons({
    2 onCancel: function(data) {
    3 // Show a cancel page or return to cart
    4 }
    5}).render('#paypal-button-container');

    We use cookies to improve your experience on our site. May we use marketing cookies to show you personalized ads? Manage all cookies