NAME

Net::Stripe - API client for Stripe.com

SYNOPSIS

my $stripe = Net::Stripe->new(api_key => $API_KEY);
my $charge = $stripe->post_charge(
    amount => 12500,
    currency => 'usd',
    card => $card_token,
    description => 'YAPC Registration',
);

# ... 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

API Object

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.

Charges

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_charge( PARAMHASH | OBJECT )

get_charge( CHARGE_ID )

refund_charge( CHARGE_ID )

get_charges( PARAMHASH )

Customers

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_customer( PARAMHASH | OBJECT )

get_customer( CUSTOMER_ID )

delete_customer( CUSTOMER_ID )

get_customers( PARAMHASH )

Subscriptions

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_subscription( PARAMHASH )

get_subscription( CUSTOMER_ID )

delete_subscription( CUSTOMER_ID )

Tokens

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_token( PARAMHASH )

get_token( TOKEN_ID )

Plans

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_plan( PARAMHASH )

get_plan( PLAN_ID )

delete_plan( PLAN_ID )

get_plans( PARAMHASH )

Coupons

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

post_coupon( PARAMHASH )

get_coupon( COUPON_ID )

delete_coupon( COUPON_ID )

get_coupons( PARAMHASH )

Invoices

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

get_invoice( COUPON_ID )

get_upcominginvoice( COUPON_ID )

get_invoices( PARAMHASH )

InvoiceItems

All methods accept the same arguments as described in the API.

See https://stripe.com/docs/api for full details.

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

AUTHORS

Luke Closs

LICENSE

Net-Stripe is Copyright 2011 Prime Radiant, Inc. Net-Stripe is distributed under the same terms as Perl itself.