NAME

WWW::PayPal::Webhook - PayPal webhook (endpoint subscription) entity

VERSION

version 0.003

SYNOPSIS

my $webhook = $pp->webhooks->create(
    url         => 'https://example.com/paypal/webhook',
    event_types => [ 'PAYMENT.CAPTURE.COMPLETED', 'CHECKOUT.ORDER.APPROVED' ],
);

print $webhook->id;
print $webhook->url;
my @names = $webhook->event_names;   # ('PAYMENT.CAPTURE.COMPLETED', ...)

DESCRIPTION

Wrapper around a PayPal webhook JSON object — the endpoint subscription that tells PayPal where to deliver events and which event types to send. This is the merchant-side registration, not the individual event payloads that arrive at your receiver; verify those with $pp->webhooks->verify.

data

Raw decoded JSON for the webhook.

id

Webhook ID (e.g. 1JE4291016473214C). Pass this to verify and store it per environment — sandbox and live webhook IDs are not interchangeable.

url

The endpoint URL PayPal delivers events to.

event_names

my @names = $webhook->event_names;

The subscribed event-type names, flattened out of PayPal's event_types => [ { name => ... }, ... ] shape.

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.