NAME

WWW::PayPal::API::Payments - PayPal Payments v2 API (captures, refunds, authorizations)

VERSION

version 0.002

SYNOPSIS

my $capture = $pp->payments->get_capture($capture_id);

my $refund = $pp->payments->refund($capture_id,
    amount => { currency_code => 'EUR', value => '10.00' },
    note_to_payer => 'Partial refund',
);

DESCRIPTION

Controller for PayPal's Payments v2 API — used here to fetch captures and issue refunds against them.

get_capture

my $capture = $pp->payments->get_capture($capture_id);

Fetches a capture by ID.

refund

my $refund = $pp->payments->refund($capture_id,
    amount         => { currency_code => 'EUR', value => '5.00' },  # optional
    invoice_id     => 'INV-123',                                     # optional
    note_to_payer  => 'Sorry!',                                      # optional
);

Refunds a capture. Omit amount to refund in full.

get_refund

my $refund = $pp->payments->get_refund($refund_id);

Fetches a refund by ID.

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.