Handle uncaptured payments

Last updated: Sept 19th, 3:14am

When a transaction is not captured within a specified amount of time after the buyer approves it through the payment method, PayPal sends CHECKOUT.PAYMENT-APPROVAL.REVERSED webhook event, initiates a cancellation of the order, and refunds the buyer's account. The time window for capturing the payment is controlled by the merchant, but the default is 3 hours.

Listen for the CHECKOUT.PAYMENT-APPROVAL.REVERSED webhook event so you can send a customized notification, branded to your company, to your buyer that provides them with possible next steps, like contacting customer support.

Know before you code

1. Listen for the CHECKOUT.PAYMENT-APPROVAL.REVERSED webhook event

A webhook handler is a script you create on your server that completes specific actions on webhooks that hit your listener URL. Each handler script implementation is different, but for this task, make sure you have logic in your handler script that listens for the CHECKOUT.PAYMENT-APPROVAL.REVERSED event. You'll need to notify the buyer of the canceled transaction and you might need logic that updates records in your systems to show the order was canceled. The following resources might be useful as you create webhook handler code:

Sample CHECKOUT.PAYMENT-APPROVAL.REVERSED webhook event

    1{
    2 "id": "WH-COC11055RA711503B-4YM959094A144403T",
    3 "create_time": "2020-01-25T21:21:49.000Z",
    4 "event_type": "CHECKOUT.PAYMENT-APPROVAL.REVERSED",
    5 "summary": "A payment has been reversed after approval.",
    6 "resource": {
    7 "order_id": "5O190127TN364715T",
    8 "purchase_units": [
    9 {
    10 "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
    11 "custom_id": "MERCHANT_CUSTOM_ID",
    12 "invoice_id": "MERCHANT_INVOICE_ID"
    13 }
    14 ],
    15 "payment_source": {
    16 "ideal": {
    17 "name": "John Doe",
    18 "country_code": "NL"
    19 }
    20 }
    21 }
    22 "event_version": "1.0"
    23}

    2. Notify buyer of cancellation

    Send a notification to your buyer to let them know there was a problem and what possible next steps they can take, like reaching out to customer support. Integrating alternative payment methods with the Orders API allows you complete customization of the checkout experience, including any error situations that occur.

    If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more