Handle payment errors
DocsLimited
Last updated: Oct 1st, 9:21am
When an Afterpay payment fails, PayPal sends webhook notifications to inform your system of the failure.
- Listen for webhook events: Monitor the following webhooks for Afterpay payment failures:
PAYMENT.CAPTURE.DENIED: Payment capture failed after buyer approval
- Extract failure details: Check the reason for failure in the webhook payload
- Display appropriate message: Show localized error message to the user
- Offer next steps: Provide options such as selecting a different payment method or retrying with Afterpay
Note: Afterpay sessions expire after 4 hours. If the buyer doesn't complete the payment within this window, they'll be redirected to your cancel_url.