Net::Stripe - API client for Stripe.com
my $stripe = Net::Stripe->new(api_key = > $API_KEY); my $card_token = 'a token'; my $charge = $stripe->post_charge( # Net::Stripe::Charge amount => 12500, currency => 'usd', card => $card_token, description => 'YAPC Registration', ); print "Charge was not paid!\n" unless $charge->paid; my $card = $charge->card; # Net::Stripe::Card # look up a charge by id my $same_charge = $stripe->get_charge($charge->id); # ... and the api mirrors https://stripe.com/docs/api # Charges: post_charge() get_charge() refund_charge() get_charges() # Customer: post_customer()
This module is a wrapper around the Stripe.com HTTP API. Methods are generally named after the HTTP method and the object name.
This method returns Moose objects for responses from the API.
This creates a new stripe api object. The following parameters are accepted:
This is required. You get this from your Stripe Account settings.
You can set this to true to see extra debug info.
All methods accept the same arguments as described in the API.
See https://stripe.com/docs/api for full details.
https://stripe.com, https://stripe.com/docs/api
Luke Closs
Net-Stripe is Copyright 2011 Prime Radiant, Inc. Net-Stripe is distributed under the same terms as Perl itself.
To install Net::Stripe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Stripe
CPAN shell
perl -MCPAN -e shell install Net::Stripe
For more information on module installation, please visit the detailed CPAN module installation guide.