NAME
WWW::PayPal::API::Orders - PayPal Checkout / Orders v2 API
VERSION
version 0.001
SYNOPSIS
my $order = $pp->orders->create(
intent => 'CAPTURE',
purchase_units => [{
amount => { currency_code => 'EUR', value => '42.00' },
}],
return_url => 'https://example.com/paypal/return',
cancel_url => 'https://example.com/paypal/cancel',
);
my $same = $pp->orders->get($order->id);
my $done = $pp->orders->capture($order->id);
DESCRIPTION
Controller for PayPal's Checkout / Orders v2 API. Dispatches via cached OpenAPI operationId entries.
client
The parent WWW::PayPal client providing HTTP transport.
openapi_operations
Pre-computed operation table (operationId → {method, path}).
create
my $order = $pp->orders->create(
intent => 'CAPTURE',
purchase_units => [ ... ],
return_url => '...',
cancel_url => '...',
);
Creates an order and returns a WWW::PayPal::Order. The buyer must be redirected to $order->approve_url to approve the payment.
get
my $order = $pp->orders->get($id);
Fetches an order by ID.
capture
my $order = $pp->orders->capture($id);
Captures an approved order. Returns the updated WWW::PayPal::Order with a completed capture attached.
authorize
my $order = $pp->orders->authorize($id);
Places an authorization on an approved order (alternative to immediate capture).
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.