NAME

Net::Stripe - API client for Stripe.com

VERSION

version 0.12

SYNOPSIS

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() 

DESCRIPTION

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.

METHODS

new PARAMHASH

This creates a new stripe api object. The following parameters are accepted:

api_key

This is required. You get this from your Stripe Account settings.

debug

You can set this to true to see extra debug info.

debug_network

You can set this to true to see the actual network requests.

Charge Methods

post_charge( PARAMHASH | OBJECT )

get_charge( CHARGE_ID )

refund_charge( CHARGE_ID )

get_charges( PARAMHASH )

Customer Methods

post_customer( PARAMHASH | OBJECT )

get_customer( CUSTOMER_ID )

delete_customer( CUSTOMER_ID )

post_customer_subscription( CUSTOMER_ID, PARAMHASH )

get_customers( PARAMHASH )

Card Methods

post_card( PARAMHASH )

get_card( customer_id => CUSTOMER_ID, card_id => CARD_ID )

get_cards( customer_id => CUSTOMER_ID)

update_card( customer_id => CUSTOMER_ID, card_id => CARD_ID)

delete_card( customer_id => CUSTOMER_ID, card_id => CARD_ID )

Subscription Methods

post_subscription( PARAMHASH )

get_subscription( customer_id => CUSTOMER_ID )

delete_subscription( customer_id => CUSTOMER_ID )

Token Methods

post_token( PARAMHASH )

get_token( TOKEN_ID )

Plan Methods

post_plan( PARAMHASH )

get_plan( PLAN_ID )

delete_plan( PLAN_ID )

get_plans( PARAMHASH )

Coupon Methods

post_coupon( PARAMHASH )

get_coupon( COUPON_ID )

delete_coupon( COUPON_ID )

get_coupons( PARAMHASH )

Invoice Methods

post_invoice( OBJECT )

get_invoice( INVOICE_ID )

get_upcominginvoice( COUPON_ID )

get_invoices( PARAMHASH )

Invoice Item Methods

post_invoiceitem( PARAMHASH | OBJECT )

get_invoiceitem( INVOICEITEM_ID )

delete_invoiceitem( INVOICEITEM_ID )

get_invoiceitems( PARAMHASH )

SEE ALSO

https://stripe.com, https://stripe.com/docs/api

CONTRIBUTORS

AUTHOR

Luke Closs

CONTRIBUTORS

  • Andrew Solomon <andrew@illywhacker.net>

  • Brian Collins <bricollins@gmail.com>

  • Devin M. Certas <devin@nacredata.com>

  • Dimitar Petrov <mitakaa@gmail.com>

  • Dylan Reinhold <dylan@gasdasoftware.com>

  • Jonathan "Duke" Leto <jonathan@leto.net>

  • Luke Closs <me@luk.ec>

  • Olaf Alders <olaf@wundersolutions.com>

  • Rusty Conover <rusty@luckydinosaur.com>

  • Sachin Sebastian <sachinjsk@users.noreply.github.com>

  • Tom Eliaz <tom@tomeliaz.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Copyright 2011, Prime Radiant, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.