NAME

Net::API::Stripe::Event - A Stripe Event Object

SYNOPSIS

VERSION

0.1

DESCRIPTION

Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new Event object. For example, when a charge succeeds, we create a charge.succeeded event; and when an invoice payment attempt fails, we create an invoice.payment_failed event. Note that many API requests may cause multiple events to be created. For example, if you create a new subscription for a customer, you will receive both a customer.subscription.created event and a charge.succeeded event.

Events occur when the state of another API resource changes. The state of that resource at the time of the change is embedded in the event's data field. For example, a charge.succeeded event will contain a charge, and an invoice.payment_failed event will contain an invoice.

As with other API resources, you can use endpoints to retrieve an individual event (https://stripe.com/docs/api/events#retrieve_event) or a list of events (https://stripe.com/docs/api/events#list_events) from the API. We also have a separate webhooks (http://en.wikipedia.org/wiki/Webhook) system for sending the Event objects directly to an endpoint on your server. Webhooks are managed in your account settings (https://dashboard.stripe.com/account/webhooks), and our Using Webhooks (https://stripe.com/docs/webhooks) guide will help you get set up.

When using Connect, you can also receive notifications of events that occur in connected accounts. For these events, there will be an additional account attribute in the received Event object.

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe objects. It may also take an hash like arguments, that also are method of the same name.

verbose

Toggles verbose mode on/off

debug

Toggles debug mode on/off

METHODS

id string

Unique identifier for the object.

object string, value is "event"

String representing the object’s type. Objects of the same type share the same value.

account Connect only string

The connected account that originated the event.

api_version string

The Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014.

created timestamp

Time at which the object was created. Measured in seconds since the Unix epoch.

data hash

Object containing data associated with the event. This is an Net::API::Stripe::Event::Data object

livemode boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

pending_webhooks positive integer or zero

Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you’ve specified.

request hash

Information on the API request that instigated the event. This is a Net::API::Stripe::Event::Request object.

type string

Description of the event (e.g., invoice.created or charge.refunded).

API SAMPLE

{
  "id": "evt_1Ccdk1CeyNCl6fY2mTXIaobI",
  "object": "event",
  "api_version": "2017-02-14",
  "created": 1528914645,
  "data": {
	"object": {
	  "object": "balance",
	  "available": [
		{
		  "currency": "jpy",
		  "amount": 1025751,
		  "source_types": {
			"card": 1025751
		  }
		}
	  ],
	  "connect_reserved": [
		{
		  "currency": "jpy",
		  "amount": 0
		}
	  ],
	  "livemode": false,
	  "pending": [
		{
		  "currency": "jpy",
		  "amount": 0,
		  "source_types": {
			"card": 0
		  }
		}
	  ]
	}
  },
  "livemode": false,
  "pending_webhooks": 0,
  "request": {
	"id": null,
	"idempotency_key": null
  },
  "type": "balance.available"
}

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/events#events, https://stripe.com/docs/api/events/types

COPYRIGHT & LICENSE

Copyright (c) 2018-2019 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 87:

You forgot a '=back' before '=head1'