line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Payout.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2020 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <@sitael.tokyo.deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/payouts |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Payout; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
852
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
433
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub id { shift->_set_get_scalar( 'id', @_ ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub object { shift->_set_get_scalar( 'object', @_ ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub amount { shift->_set_get_number( 'amount', @_ ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub arrival_date { shift->_set_get_datetime( 'arrival_date', @_ ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub automatic { shift->_set_get_boolean( 'automatic', @_ ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub balance_transaction { shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub created { shift->_set_get_datetime( 'created', @_ ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub currency { shift->_set_get_scalar( 'currency', @_ ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub description { shift->_set_get_scalar( 'description', @_ ); } |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub destination { shift->_set_get_scalar_or_object( 'destination', 'Net::API::Stripe::Connect::Account', @_ ); } |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub failure_balance_transaction { shift->_set_get_scalar_or_object( 'failure_balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ); } |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
sub failure_code { shift->_set_get_scalar( 'failure_code', @_ ); } |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
sub failure_message { shift->_set_get_scalar( 'failure_message', @_ ); } |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub livemode { shift->_set_get_boolean( 'livemode', @_ ); } |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
sub metadata { shift->_set_get_hash( 'metadata', @_ ); } |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub method { shift->_set_get_scalar( 'method', @_ ); } |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
|
sub source_type { shift->_set_get_scalar( 'source_type', @_ ); } |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
0
|
1
|
|
sub statement_descriptor { shift->_set_get_scalar( 'statement_descriptor', @_ ); } |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
0
|
1
|
|
sub status { shift->_set_get_scalar( 'status', @_ ); } |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
0
|
1
|
|
sub type { shift->_set_get_scalar( 'type', @_ ); } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding utf8 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Net::API::Stripe::Payout - A Stripe Payout Object |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
my $payout = $stripe->payout({ |
72
|
|
|
|
|
|
|
amount => 2000, |
73
|
|
|
|
|
|
|
arrival_date => '2020-04-12', |
74
|
|
|
|
|
|
|
automatic => $stripe->true, |
75
|
|
|
|
|
|
|
currency => 'jpy', |
76
|
|
|
|
|
|
|
description => 'Customer payout', |
77
|
|
|
|
|
|
|
destination => $connect_account_object, |
78
|
|
|
|
|
|
|
livemode => $stripe->false, |
79
|
|
|
|
|
|
|
metadata => { transaction_id => 123, customer_id => 456 }, |
80
|
|
|
|
|
|
|
method => 'standard', |
81
|
|
|
|
|
|
|
statement_descriptor => 'Fund raised payout', |
82
|
|
|
|
|
|
|
status => 'pending', |
83
|
|
|
|
|
|
|
type => 'bank_account', |
84
|
|
|
|
|
|
|
}); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 VERSION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
v0.100.0 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 DESCRIPTION |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
A Payout object is created when you receive funds from Stripe, or when you initiate a payout to either a bank account or debit card of a connected Stripe account (L<https://stripe.com/docs/connect/payouts>). You can retrieve individual payouts, as well as list all payouts. Payouts are made on varying schedules, depending on your country and industry. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=over 4 |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Payout> object. |
103
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=back |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 METHODS |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=over 4 |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item B<id> string |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Unique identifier for the object. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item B<object> string, value is "payout" |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item B<amount> integer |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Amount (in JPY) to be transferred to your bank account or debit card. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item B<arrival_date> timestamp |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item B<automatic> boolean |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Returns true if the payout was created by an automated payout schedule (L<https://stripe.com/docs/payouts#payout-schedule>), and false if it was requested manually (L<https://stripe.com/docs/payouts#manual-payouts>). |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item B<balance_transaction> string (expandable) |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
ID of the balance transaction that describes the impact of this payout on your account balance. This is a string or a L<Net::API::Stripe::Balance::Transaction> object. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item B<created> timestamp |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item B<currency> currency |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Three-letter ISO currency code (L<https://www.iso.org/iso-4217-currency-codes.html>), in lowercase. Must be a supported currency (L<https://stripe.com/docs/currencies>). |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item B<description> string |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
An arbitrary string attached to the object. Often useful for displaying to users. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item B<destination> string expandable card or bank account |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
ID of the bank account or card the payout was sent to. This is a string or a L<Net::API::Stripe::Connect::Account> object. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item B<failure_balance_transaction> string (expandable) |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. Alternatively it can also be the L<Net::API::Stripe::Balance::Transaction> object if it was expanded. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=item B<failure_code> string |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Error code explaining reason for payout failure if available. See Types of payout failures (L<https://stripe.com/docs/api#payout_failures>) for a list of failure codes. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=item B<failure_message> string |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Message to user further explaining reason for payout failure if available. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=item B<livemode> boolean |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=item B<metadata> hash |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=item B<method> string |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
The method used to send this payout, which can be standard or instant. instant is only supported for payouts to debit cards. (See Instant payouts for marketplaces for more information: L<https://stripe.com/blog/instant-payouts-for-marketplaces>) |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=item B<source_type> string |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
The source balance this payout came from. One of card or bank_account. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item B<statement_descriptor> string |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Extra information about a payout to be displayed on the userâs bank statement. |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=item B<status> string |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Current status of the payout (paid, pending, in_transit, canceled or failed). A payout will be pending until it is submitted to the bank, at which point it becomes in_transit. It will then change to paid if the transaction goes through. If it does not go through successfully, its status will change to failed or canceled. |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=item B<type> string |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Can be bank_account or card. |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=back |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head1 API SAMPLE |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
{ |
196
|
|
|
|
|
|
|
"id": "po_fake123456789", |
197
|
|
|
|
|
|
|
"object": "payout", |
198
|
|
|
|
|
|
|
"amount": 7712, |
199
|
|
|
|
|
|
|
"arrival_date": 1568851200, |
200
|
|
|
|
|
|
|
"automatic": true, |
201
|
|
|
|
|
|
|
"balance_transaction": "txn_fake123456789", |
202
|
|
|
|
|
|
|
"created": 1568682616, |
203
|
|
|
|
|
|
|
"currency": "jpy", |
204
|
|
|
|
|
|
|
"description": "STRIPE PAYOUT", |
205
|
|
|
|
|
|
|
"destination": "ba_fake123456789", |
206
|
|
|
|
|
|
|
"failure_balance_transaction": null, |
207
|
|
|
|
|
|
|
"failure_code": null, |
208
|
|
|
|
|
|
|
"failure_message": null, |
209
|
|
|
|
|
|
|
"livemode": false, |
210
|
|
|
|
|
|
|
"metadata": {}, |
211
|
|
|
|
|
|
|
"method": "standard", |
212
|
|
|
|
|
|
|
"source_type": "card", |
213
|
|
|
|
|
|
|
"statement_descriptor": null, |
214
|
|
|
|
|
|
|
"status": "paid", |
215
|
|
|
|
|
|
|
"type": "bank_account" |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=head1 HISTORY |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head2 v0.100.0 |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
Initial version |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head1 STRIPE HISTORY |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=head2 2017-04-06 |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Splits the Transfer object into Payout and Transfer. The Payout object represents money moving from a Stripe account to an external account (bank or debit card). The Transfer object now only represents money moving between Stripe accounts on a Connect platform. For more details, see L<https://stripe.com/docs/transfer-payout-split>. |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=head1 AUTHOR |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=head1 SEE ALSO |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
Stripe API documentation: |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/payouts>, |
239
|
|
|
|
|
|
|
L<https://stripe.com/docs/payouts> |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
246
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=cut |