# Show cancellation page (/platforms/checkout/standard/customize/show-cancellation-page)



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

## Know before you code [#know-before-you-code]

> **Info:** ### Expanded Checkout [#expanded-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 Expanded Checkout integration and uses the following:
>
> * [JavaScript SDK:](/sdk/js/) Adds PayPal-supported payment methods.
> * [Orders REST API:](/api/orders/v2) Create, update, retrieve, authorize, and capture orders.
>
> [Get started](/platforms/get-started/)
>
> [Expanded Checkout](/platforms/checkout/advanced/)

> **Info:** ### Explore PayPal APIs with Postman [#explore-paypal-apis-with-postman]
>
> You can use Postman to explore and test PayPal APIs. Learn more in our [Postman guide](/api/rest/postman).

## Display a cancellation page [#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:

```text lineNumbers
paypal.Buttons({
    onCancel: function(data) {
        // Show a cancel page or return to cart
    }
}).render('#paypal-button-container');
```
