line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Treasury/OutboundPayment.pm |
3
|
|
|
|
|
|
|
## Version v0.1.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2022 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2022/10/29 |
7
|
|
|
|
|
|
|
## Modified 2022/10/29 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
2
|
|
|
2
|
|
24150796
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
71
|
|
14
|
2
|
|
|
2
|
|
11
|
our( $VERSION ) = 'v0.1.0'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
11
|
|
15
|
2
|
|
|
2
|
|
1262
|
}; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
1
|
|
|
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
1
|
|
|
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
1
|
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
{ |
27
|
|
|
|
|
|
|
billing_details => { package => "Net::API::Stripe::Billing::Details", type => "object" }, |
28
|
0
|
|
|
0
|
1
|
|
financial_account => { |
29
|
|
|
|
|
|
|
package => "Net::API::Stripe::Connect::ExternalAccount::Card", |
30
|
0
|
|
|
0
|
1
|
|
type => "object", |
31
|
|
|
|
|
|
|
}, |
32
|
0
|
|
|
0
|
1
|
|
type => { type => "scalar" }, |
33
|
|
|
|
|
|
|
us_bank_account => { |
34
|
0
|
|
|
0
|
1
|
|
package => "Net::API::Stripe::Connect::ExternalAccount::Bank", |
35
|
|
|
|
|
|
|
type => "object", |
36
|
0
|
|
|
0
|
1
|
|
}, |
37
|
|
|
|
|
|
|
}, @_ ) ); } |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
{ |
40
|
|
|
|
|
|
|
ip_address => { type => "scalar" }, |
41
|
|
|
|
|
|
|
present => { type => "boolean" }, |
42
|
|
|
|
|
|
|
}, @_ ) ); } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
0
|
1
|
|
code => { type => "scalar" }, |
51
|
|
|
|
|
|
|
transaction => { |
52
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::Transaction", |
53
|
|
|
|
|
|
|
type => "scalar_or_object", |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
}, @_ ) ); } |
56
|
0
|
|
|
0
|
1
|
|
|
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
0
|
1
|
|
|
59
|
|
|
|
|
|
|
{ |
60
|
0
|
|
|
0
|
1
|
|
canceled_at => { type => "datetime" }, |
61
|
|
|
|
|
|
|
failed_at => { type => "datetime" }, |
62
|
0
|
|
|
0
|
1
|
|
posted_at => { type => "datetime" }, |
63
|
|
|
|
|
|
|
returned_at => { type => "datetime" }, |
64
|
0
|
|
|
0
|
1
|
|
}, @_ ) ); } |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
0
|
1
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
# NOTE: POD |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=encoding utf8 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 NAME |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Net::API::Stripe::Treasury::OutboundPayment - The OutboundPayment object |
75
|
0
|
|
|
0
|
1
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
0
|
|
|
0
|
1
|
|
|
78
|
|
|
|
|
|
|
=head1 VERSION |
79
|
0
|
|
|
0
|
1
|
|
|
80
|
|
|
|
|
|
|
v0.1.0 |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 DESCRIPTION |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Use OutboundPayments to send funds to another party's external bank account or L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts>. To send money to an account belonging to the same user, use an L<OutboundTransfer|https://stripe.com/docs/api/treasury/outbound_transfers>. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Simulate OutboundPayment state changes with the C</v1/test_helpers/treasury/outbound_payments> endpoints. These methods can only be called on test mode objects. |
87
|
0
|
|
|
0
|
1
|
|
|
88
|
|
|
|
|
|
|
=head1 METHODS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 id string |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Unique identifier for the object. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 object string |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
String representing the object's type. Objects of the same type share the same value. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 amount integer |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Amount (in cents) transferred. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 cancelable boolean |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Returns C<true> if the object can be canceled, and C<false> otherwise. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 created timestamp |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 currency currency |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 customer string |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
ID of the L<customer|https://stripe.com/docs/api/customers> to whom an OutboundPayment is sent. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 description string |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
An arbitrary string attached to the object. Often useful for displaying to users. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 destination_payment_method string |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using C<destination_payment_method_data>. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 destination_payment_method_details hash |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Details about the PaymentMethod for an OutboundPayment. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
It has the following properties: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=over 4 |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item C<billing_details> hash |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Contact details for the person or business receiving the OutboundPayment. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Billing::Details> object. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item C<financial_account> hash |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Details about the C<financial_account.> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Card> object. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item C<type> string |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
The type of the payment method used in the OutboundPayment. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item C<us_bank_account> hash |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Details about the C<us_bank_account.> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=back |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head2 end_user_details hash |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Details about the end user. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
It has the following properties: |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=over 4 |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=item C<ip_address> string |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
IP address of the user initiating the OutboundPayment. Set if C<present> is set to C<true>. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=item C<present> boolean |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
C<true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise,>false`. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=back |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head2 expected_arrival_date timestamp |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
The date when funds are expected to arrive in the destination account. |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head2 financial_account string |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
The FinancialAccount that funds were pulled from. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 hosted_regulatory_receipt_url string |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
A L<hosted transaction receipt|https://stripe.com/docs/treasury/moving-money/regulatory-receipts> URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head2 livemode boolean |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode. |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head2 metadata hash |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=head2 returned_details hash |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
Details about a returned OutboundPayment. Only set when the status is C<returned>. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
It has the following properties: |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=over 4 |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=item C<code> string |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
Reason for the return. |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=item C<transaction> string expandable |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
The Transaction associated with this object. |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object. |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=back |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head2 statement_descriptor string |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head2 status string |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
Current status of the OutboundPayment: C<processing>, C<failed>, C<posted>, C<returned>, C<canceled>. An OutboundPayment is C<processing> if it has been created and is pending. The status changes to C<posted> once the OutboundPayment has been "confirmed" and funds have left the account, or to C<failed> or C<canceled>. If an OutboundPayment fails to arrive at its destination, its status will change to C<returned>. |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head2 status_transitions hash |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
Hash containing timestamps of when the object transitioned to a particular C<status>. |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
It has the following properties: |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=over 4 |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=item C<canceled_at> timestamp |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
Timestamp describing when an OutboundPayment changed status to C<canceled>. |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=item C<failed_at> timestamp |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
Timestamp describing when an OutboundPayment changed status to C<failed>. |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=item C<posted_at> timestamp |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
Timestamp describing when an OutboundPayment changed status to C<posted>. |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=item C<returned_at> timestamp |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
Timestamp describing when an OutboundPayment changed status to C<returned>. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=back |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=head2 transaction expandable |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
The Transaction associated with this object. |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object. |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=head1 API SAMPLE |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
[ |
259
|
|
|
|
|
|
|
{ |
260
|
|
|
|
|
|
|
"amount" : "10000", |
261
|
|
|
|
|
|
|
"cancelable" : 1, |
262
|
|
|
|
|
|
|
"created" : "1662261086", |
263
|
|
|
|
|
|
|
"currency" : "usd", |
264
|
|
|
|
|
|
|
"customer" : null, |
265
|
|
|
|
|
|
|
"description" : "OutboundPayment to a 3rd party", |
266
|
|
|
|
|
|
|
"destination_payment_method" : null, |
267
|
|
|
|
|
|
|
"destination_payment_method_details" : { |
268
|
|
|
|
|
|
|
"billing_details" : { |
269
|
|
|
|
|
|
|
"address" : { |
270
|
|
|
|
|
|
|
"city" : "San Francisco", |
271
|
|
|
|
|
|
|
"country" : "US", |
272
|
|
|
|
|
|
|
"line1" : "1234 Fake Street", |
273
|
|
|
|
|
|
|
"line2" : null, |
274
|
|
|
|
|
|
|
"postal_code" : "94102", |
275
|
|
|
|
|
|
|
"state" : "CA" |
276
|
|
|
|
|
|
|
}, |
277
|
|
|
|
|
|
|
"email" : null, |
278
|
|
|
|
|
|
|
"name" : "Jane Austen" |
279
|
|
|
|
|
|
|
}, |
280
|
|
|
|
|
|
|
"type" : "us_bank_account", |
281
|
|
|
|
|
|
|
"us_bank_account" : { |
282
|
|
|
|
|
|
|
"account_holder_type" : "individual", |
283
|
|
|
|
|
|
|
"account_type" : "checking", |
284
|
|
|
|
|
|
|
"bank_name" : "STRIPE TEST BANK", |
285
|
|
|
|
|
|
|
"fingerprint" : "1JWtPxqbdX5Gamtz", |
286
|
|
|
|
|
|
|
"last4" : "6789", |
287
|
|
|
|
|
|
|
"network" : "ach", |
288
|
|
|
|
|
|
|
"routing_number" : "110000000" |
289
|
|
|
|
|
|
|
} |
290
|
|
|
|
|
|
|
}, |
291
|
|
|
|
|
|
|
"end_user_details" : { |
292
|
|
|
|
|
|
|
"ip_address" : null, |
293
|
|
|
|
|
|
|
"present" : 0 |
294
|
|
|
|
|
|
|
}, |
295
|
|
|
|
|
|
|
"expected_arrival_date" : "1662422400", |
296
|
|
|
|
|
|
|
"financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE", |
297
|
|
|
|
|
|
|
"hosted_regulatory_receipt_url" : "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKN6u0JgGMga0Su026sg6NpNF_5Q6tvMEpWEUiDbGDU97VaAIklGS9OIDXmvjiWY8npbpXaOBAk0SB9UCp4Ga0Qx_Ft3Ksg", |
298
|
|
|
|
|
|
|
"id" : "obp_1Le9F42eZvKYlo2CBS5f6W7m", |
299
|
|
|
|
|
|
|
"livemode" : 0, |
300
|
|
|
|
|
|
|
"metadata" : {}, |
301
|
|
|
|
|
|
|
"object" : "treasury.outbound_payment", |
302
|
|
|
|
|
|
|
"returned_details" : null, |
303
|
|
|
|
|
|
|
"statement_descriptor" : "payment", |
304
|
|
|
|
|
|
|
"status" : "processing", |
305
|
|
|
|
|
|
|
"status_transitions" : { |
306
|
|
|
|
|
|
|
"canceled_at" : null, |
307
|
|
|
|
|
|
|
"failed_at" : null, |
308
|
|
|
|
|
|
|
"posted_at" : null, |
309
|
|
|
|
|
|
|
"returned_at" : null |
310
|
|
|
|
|
|
|
}, |
311
|
|
|
|
|
|
|
"transaction" : "trxn_1Le9F32eZvKYlo2C2dtkse82" |
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
] |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
=head1 HISTORY |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=head2 v0.1.0 |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
Initial version |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=head1 AUTHOR |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
=head1 SEE ALSO |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
L<Stripe API documentation|https://stripe.com/docs/api/treasury/outbound_payments> |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
Copyright (c) 2019-2022 DEGUEST Pte. Ltd. |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
334
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=cut |