NAME
WWW::PayPal::WebhookEvents - Curated PayPal webhook event-name constants
VERSION
version 0.003
SYNOPSIS
use WWW::PayPal::WebhookEvents qw( :all );
my $webhook = $pp->webhooks->create(
url => 'https://example.com/paypal/webhook',
event_types => [
CHECKOUT_ORDER_APPROVED,
PAYMENT_CAPTURE_COMPLETED,
BILLING_SUBSCRIPTION_ACTIVATED,
PAYMENT_SALE_COMPLETED,
],
);
# ...or import a single name:
use WWW::PayPal::WebhookEvents qw( PAYMENT_CAPTURE_COMPLETED );
DESCRIPTION
Plain constant module (no Moo) exporting the PayPal webhook event names that the two flows this distribution targets actually need: one-off purchases (Orders v2 / capture) and recurring subscriptions (Billing v1), plus the dispute event that must always reach a human. Each constant is the exact event-type string PayPal sends and expects in a webhook subscription's event_types.
Constant names are the event strings with dots turned into underscores and uppercased, so PAYMENT.CAPTURE.COMPLETED becomes "PAYMENT_CAPTURE_COMPLETED".
Import individual names, or the whole set with the :all tag.
CHECKOUT_ORDER_APPROVED
CHECKOUT.ORDER.APPROVED — buyer approved an order; safe to capture server-side.
PAYMENT_CAPTURE_COMPLETED
PAYMENT.CAPTURE.COMPLETED — money received. Grant the one-off entitlement here, not in the browser return handler.
PAYMENT_CAPTURE_DENIED
PAYMENT.CAPTURE.DENIED — a capture was denied (Payments v1). Revoke / never grant.
PAYMENT_CAPTURE_DECLINED
PAYMENT.CAPTURE.DECLINED — a capture was declined (Payments v2, the version Orders v2 captures emit). Revoke / never grant.
PAYMENT_CAPTURE_REFUNDED
PAYMENT.CAPTURE.REFUNDED — a capture was refunded (possibly from the PayPal web UI, not your code).
PAYMENT_CAPTURE_REVERSED
PAYMENT.CAPTURE.REVERSED — money taken back, e.g. a chargeback outcome.
BILLING_SUBSCRIPTION_ACTIVATED
BILLING.SUBSCRIPTION.ACTIVATED — start the subscription entitlement.
BILLING_SUBSCRIPTION_UPDATED
BILLING.SUBSCRIPTION.UPDATED — plan/quantity change went through.
BILLING_SUBSCRIPTION_SUSPENDED
BILLING.SUBSCRIPTION.SUSPENDED — pause the entitlement. Check failed_payments_count before assuming the user paused voluntarily.
BILLING_SUBSCRIPTION_CANCELLED
BILLING.SUBSCRIPTION.CANCELLED — terminal; end the entitlement.
BILLING_SUBSCRIPTION_EXPIRED
BILLING.SUBSCRIPTION.EXPIRED — terminal; end the entitlement.
BILLING_SUBSCRIPTION_PAYMENT_FAILED
BILLING.SUBSCRIPTION.PAYMENT.FAILED — dunning: warn the user, count attempts.
PAYMENT_SALE_COMPLETED
PAYMENT.SALE.COMPLETED — a recurring payment was collected. This, not a subscription event, is the renewal trigger.
CUSTOMER_DISPUTE_CREATED
CUSTOMER.DISPUTE.CREATED — a human must look; freeze automated refunds for that transaction.
SEE ALSO
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-paypal/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.