stripe-ruby-mock 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/rspec_tests.yml +38 -0
  3. data/.rspec +2 -1
  4. data/CHANGELOG.md +62 -15
  5. data/Gemfile +1 -0
  6. data/README.md +5 -3
  7. data/lib/stripe_mock/api/client.rb +1 -1
  8. data/lib/stripe_mock/api/instance.rb +1 -1
  9. data/lib/stripe_mock/api/webhooks.rb +66 -25
  10. data/lib/stripe_mock/client.rb +2 -1
  11. data/lib/stripe_mock/data/list.rb +31 -6
  12. data/lib/stripe_mock/data.rb +201 -30
  13. data/lib/stripe_mock/instance.rb +12 -3
  14. data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
  15. data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
  16. data/lib/stripe_mock/request_handlers/charges.rb +11 -4
  17. data/lib/stripe_mock/request_handlers/checkout_session.rb +179 -0
  18. data/lib/stripe_mock/request_handlers/customers.rb +22 -13
  19. data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
  20. data/lib/stripe_mock/request_handlers/events.rb +30 -3
  21. data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
  22. data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +1 -0
  23. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +36 -12
  24. data/lib/stripe_mock/request_handlers/invoices.rb +10 -4
  25. data/lib/stripe_mock/request_handlers/payment_intents.rb +13 -2
  26. data/lib/stripe_mock/request_handlers/payment_methods.rb +11 -4
  27. data/lib/stripe_mock/request_handlers/prices.rb +62 -0
  28. data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
  29. data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
  30. data/lib/stripe_mock/request_handlers/setup_intents.rb +16 -9
  31. data/lib/stripe_mock/request_handlers/sources.rb +12 -6
  32. data/lib/stripe_mock/request_handlers/subscriptions.rb +120 -21
  33. data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
  34. data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
  35. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +33 -4
  36. data/lib/stripe_mock/server.rb +2 -2
  37. data/lib/stripe_mock/test_strategies/base.rb +62 -10
  38. data/lib/stripe_mock/version.rb +1 -1
  39. data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
  40. data/lib/stripe_mock/webhook_fixtures/balance.available.json +27 -15
  41. data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
  42. data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
  43. data/lib/stripe_mock/webhook_fixtures/charge.failed.json +49 -120
  44. data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
  45. data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
  46. data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
  47. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
  48. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
  49. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
  50. data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -46
  51. data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
  52. data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
  53. data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
  54. data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
  55. data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
  56. data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
  57. data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -47
  58. data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
  59. data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
  60. data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
  61. data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
  62. data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
  63. data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
  64. data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
  65. data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
  66. data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
  67. data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
  68. data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
  69. data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
  70. data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
  71. data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
  72. data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +225 -0
  73. data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
  74. data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
  75. data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +196 -0
  76. data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
  77. data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
  78. data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
  79. data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
  80. data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
  81. data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
  82. data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
  83. data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
  84. data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
  85. data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
  86. data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
  87. data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
  88. data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
  89. data/lib/stripe_mock/webhook_fixtures/product.created.json +19 -13
  90. data/lib/stripe_mock/webhook_fixtures/product.deleted.json +20 -14
  91. data/lib/stripe_mock/webhook_fixtures/product.updated.json +24 -15
  92. data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
  93. data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
  94. data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
  95. data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
  96. data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
  97. data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
  98. data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
  99. data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
  100. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
  101. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
  102. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
  103. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
  104. data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
  105. data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
  106. data/lib/stripe_mock.rb +7 -1
  107. data/spec/instance_spec.rb +7 -7
  108. data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
  109. data/spec/list_spec.rb +23 -0
  110. data/spec/readme_spec.rb +1 -1
  111. data/spec/server_spec.rb +4 -2
  112. data/spec/shared_stripe_examples/account_examples.rb +9 -1
  113. data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
  114. data/spec/shared_stripe_examples/balance_examples.rb +6 -0
  115. data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
  116. data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
  117. data/spec/shared_stripe_examples/customer_examples.rb +11 -13
  118. data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
  119. data/spec/shared_stripe_examples/invoice_examples.rb +29 -8
  120. data/spec/shared_stripe_examples/payment_intent_examples.rb +74 -0
  121. data/spec/shared_stripe_examples/payment_method_examples.rb +336 -67
  122. data/spec/shared_stripe_examples/price_examples.rb +223 -0
  123. data/spec/shared_stripe_examples/product_examples.rb +1 -9
  124. data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
  125. data/spec/shared_stripe_examples/refund_examples.rb +13 -0
  126. data/spec/shared_stripe_examples/setup_intent_examples.rb +17 -0
  127. data/spec/shared_stripe_examples/subscription_examples.rb +327 -9
  128. data/spec/shared_stripe_examples/transfer_examples.rb +10 -1
  129. data/spec/shared_stripe_examples/webhook_event_examples.rb +51 -5
  130. data/spec/spec_helper.rb +4 -0
  131. data/spec/stripe_mock_spec.rb +2 -2
  132. data/spec/support/stripe_examples.rb +8 -2
  133. data/stripe-ruby-mock.gemspec +7 -2
  134. metadata +72 -15
  135. data/.travis.yml +0 -28
  136. data/lib/stripe_mock/request_handlers/checkout.rb +0 -15
  137. data/spec/shared_stripe_examples/checkout_examples.rb +0 -19
@@ -0,0 +1,73 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320024,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_000000000000000000000000",
9
+ "object": "payment_intent",
10
+ "amount": 2000,
11
+ "amount_capturable": 0,
12
+ "amount_received": 0,
13
+ "application": null,
14
+ "application_fee_amount": null,
15
+ "automatic_payment_methods": null,
16
+ "canceled_at": 1648320024,
17
+ "cancellation_reason": "requested_by_customer",
18
+ "capture_method": "automatic",
19
+ "charges": {
20
+ "object": "list",
21
+ "data": [
22
+
23
+ ],
24
+ "has_more": false,
25
+ "total_count": 0,
26
+ "url": "/v1/charges?payment_intent=pi_000000000000000000000000"
27
+ },
28
+ "client_secret": "pi_000000000000000000000000_secret_0000000000000000000000000",
29
+ "confirmation_method": "automatic",
30
+ "created": 1648320024,
31
+ "currency": "usd",
32
+ "customer": null,
33
+ "description": "(created by Stripe CLI)",
34
+ "invoice": null,
35
+ "last_payment_error": null,
36
+ "livemode": false,
37
+ "metadata": {
38
+ },
39
+ "next_action": null,
40
+ "on_behalf_of": null,
41
+ "payment_method": null,
42
+ "payment_method_options": {
43
+ "card": {
44
+ "installments": null,
45
+ "mandate_options": null,
46
+ "network": null,
47
+ "request_three_d_secure": "automatic"
48
+ }
49
+ },
50
+ "payment_method_types": [
51
+ "card"
52
+ ],
53
+ "processing": null,
54
+ "receipt_email": null,
55
+ "review": null,
56
+ "setup_future_usage": null,
57
+ "shipping": null,
58
+ "source": null,
59
+ "statement_descriptor": null,
60
+ "statement_descriptor_suffix": null,
61
+ "status": "canceled",
62
+ "transfer_data": null,
63
+ "transfer_group": null
64
+ }
65
+ },
66
+ "livemode": false,
67
+ "pending_webhooks": 2,
68
+ "request": {
69
+ "id": "req_00000000000000",
70
+ "idempotency_key": "696d09f4-dbea-44e6-8c70-39430b961361"
71
+ },
72
+ "type": "payment_intent.canceled"
73
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320032,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_000000000000000000000000",
9
+ "object": "payment_intent",
10
+ "amount": 2000,
11
+ "amount_capturable": 0,
12
+ "amount_received": 0,
13
+ "application": null,
14
+ "application_fee_amount": null,
15
+ "automatic_payment_methods": null,
16
+ "canceled_at": null,
17
+ "cancellation_reason": null,
18
+ "capture_method": "automatic",
19
+ "charges": {
20
+ "object": "list",
21
+ "data": [
22
+
23
+ ],
24
+ "has_more": false,
25
+ "total_count": 0,
26
+ "url": "/v1/charges?payment_intent=pi_000000000000000000000000"
27
+ },
28
+ "client_secret": "pi_000000000000000000000000_secret_0000000000000000000000000",
29
+ "confirmation_method": "automatic",
30
+ "created": 1648320032,
31
+ "currency": "usd",
32
+ "customer": null,
33
+ "description": "(created by Stripe CLI)",
34
+ "invoice": null,
35
+ "last_payment_error": null,
36
+ "livemode": false,
37
+ "metadata": {
38
+ },
39
+ "next_action": null,
40
+ "on_behalf_of": null,
41
+ "payment_method": null,
42
+ "payment_method_options": {
43
+ "card": {
44
+ "installments": null,
45
+ "mandate_options": null,
46
+ "network": null,
47
+ "request_three_d_secure": "automatic"
48
+ }
49
+ },
50
+ "payment_method_types": [
51
+ "card"
52
+ ],
53
+ "processing": null,
54
+ "receipt_email": null,
55
+ "review": null,
56
+ "setup_future_usage": null,
57
+ "shipping": {
58
+ "address": {
59
+ "city": "San Francisco",
60
+ "country": "US",
61
+ "line1": "510 Townsend St",
62
+ "line2": null,
63
+ "postal_code": "94103",
64
+ "state": "CA"
65
+ },
66
+ "carrier": null,
67
+ "name": "Jenny Rosen",
68
+ "phone": null,
69
+ "tracking_number": null
70
+ },
71
+ "source": null,
72
+ "statement_descriptor": null,
73
+ "statement_descriptor_suffix": null,
74
+ "status": "requires_payment_method",
75
+ "transfer_data": null,
76
+ "transfer_group": null
77
+ }
78
+ },
79
+ "livemode": false,
80
+ "pending_webhooks": 2,
81
+ "request": {
82
+ "id": "req_00000000000000",
83
+ "idempotency_key": "7143a956-2f40-407a-b312-43038ae76c86"
84
+ },
85
+ "type": "payment_intent.created"
86
+ }
@@ -0,0 +1,225 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320029,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_000000000000000000000000",
9
+ "object": "payment_intent",
10
+ "amount": 2000,
11
+ "amount_capturable": 0,
12
+ "amount_received": 0,
13
+ "application": null,
14
+ "application_fee_amount": null,
15
+ "automatic_payment_methods": null,
16
+ "canceled_at": null,
17
+ "cancellation_reason": null,
18
+ "capture_method": "automatic",
19
+ "charges": {
20
+ "object": "list",
21
+ "data": [
22
+ {
23
+ "id": "ch_000000000000000000000000",
24
+ "object": "charge",
25
+ "amount": 2000,
26
+ "amount_captured": 0,
27
+ "amount_refunded": 0,
28
+ "application": null,
29
+ "application_fee": null,
30
+ "application_fee_amount": null,
31
+ "balance_transaction": null,
32
+ "billing_details": {
33
+ "address": {
34
+ "city": null,
35
+ "country": null,
36
+ "line1": null,
37
+ "line2": null,
38
+ "postal_code": null,
39
+ "state": null
40
+ },
41
+ "email": null,
42
+ "name": null,
43
+ "phone": null
44
+ },
45
+ "calculated_statement_descriptor": "EXAMPLECOMPANY",
46
+ "captured": false,
47
+ "created": 1648320028,
48
+ "currency": "usd",
49
+ "customer": null,
50
+ "description": "(created by Stripe CLI)",
51
+ "destination": null,
52
+ "dispute": null,
53
+ "disputed": false,
54
+ "failure_code": "card_declined",
55
+ "failure_message": "Your card was declined.",
56
+ "fraud_details": {
57
+ },
58
+ "invoice": null,
59
+ "livemode": false,
60
+ "metadata": {
61
+ },
62
+ "on_behalf_of": null,
63
+ "order": null,
64
+ "outcome": {
65
+ "network_status": "declined_by_network",
66
+ "reason": "generic_decline",
67
+ "risk_level": "normal",
68
+ "risk_score": 1,
69
+ "seller_message": "The bank did not return any further details with this decline.",
70
+ "type": "issuer_declined"
71
+ },
72
+ "paid": false,
73
+ "payment_intent": "pi_000000000000000000000000",
74
+ "payment_method": "pm_000000000000000000000000",
75
+ "payment_method_details": {
76
+ "card": {
77
+ "brand": "visa",
78
+ "checks": {
79
+ "address_line1_check": null,
80
+ "address_postal_code_check": null,
81
+ "cvc_check": null
82
+ },
83
+ "country": "US",
84
+ "exp_month": 3,
85
+ "exp_year": 2023,
86
+ "fingerprint": "kMzSwhaalD1uR96R",
87
+ "funding": "credit",
88
+ "installments": null,
89
+ "last4": "0002",
90
+ "mandate": null,
91
+ "network": "visa",
92
+ "three_d_secure": null,
93
+ "wallet": null
94
+ },
95
+ "type": "card"
96
+ },
97
+ "receipt_email": null,
98
+ "receipt_number": null,
99
+ "receipt_url": null,
100
+ "refunded": false,
101
+ "refunds": {
102
+ "object": "list",
103
+ "data": [
104
+
105
+ ],
106
+ "has_more": false,
107
+ "total_count": 0,
108
+ "url": "/v1/charges/ch_000000000000000000000000/refunds"
109
+ },
110
+ "review": null,
111
+ "shipping": null,
112
+ "source": null,
113
+ "source_transfer": null,
114
+ "statement_descriptor": null,
115
+ "statement_descriptor_suffix": null,
116
+ "status": "failed",
117
+ "transfer_data": null,
118
+ "transfer_group": null
119
+ }
120
+ ],
121
+ "has_more": false,
122
+ "total_count": 1,
123
+ "url": "/v1/charges?payment_intent=pi_000000000000000000000000"
124
+ },
125
+ "client_secret": "pi_000000000000000000000000_secret_0000000000000000000000000",
126
+ "confirmation_method": "automatic",
127
+ "created": 1648320028,
128
+ "currency": "usd",
129
+ "customer": null,
130
+ "description": "(created by Stripe CLI)",
131
+ "invoice": null,
132
+ "last_payment_error": {
133
+ "charge": "ch_000000000000000000000000",
134
+ "code": "card_declined",
135
+ "decline_code": "generic_decline",
136
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
137
+ "message": "Your card was declined.",
138
+ "payment_method": {
139
+ "id": "pm_000000000000000000000000",
140
+ "object": "payment_method",
141
+ "billing_details": {
142
+ "address": {
143
+ "city": null,
144
+ "country": null,
145
+ "line1": null,
146
+ "line2": null,
147
+ "postal_code": null,
148
+ "state": null
149
+ },
150
+ "email": null,
151
+ "name": null,
152
+ "phone": null
153
+ },
154
+ "card": {
155
+ "brand": "visa",
156
+ "checks": {
157
+ "address_line1_check": null,
158
+ "address_postal_code_check": null,
159
+ "cvc_check": null
160
+ },
161
+ "country": "US",
162
+ "exp_month": 3,
163
+ "exp_year": 2023,
164
+ "fingerprint": "kMzSwhaalD1uR96R",
165
+ "funding": "credit",
166
+ "generated_from": null,
167
+ "last4": "0002",
168
+ "networks": {
169
+ "available": [
170
+ "visa"
171
+ ],
172
+ "preferred": null
173
+ },
174
+ "three_d_secure_usage": {
175
+ "supported": true
176
+ },
177
+ "wallet": null
178
+ },
179
+ "created": 1648320028,
180
+ "customer": null,
181
+ "livemode": false,
182
+ "metadata": {
183
+ },
184
+ "type": "card"
185
+ },
186
+ "type": "card_error"
187
+ },
188
+ "livemode": false,
189
+ "metadata": {
190
+ },
191
+ "next_action": null,
192
+ "on_behalf_of": null,
193
+ "payment_method": null,
194
+ "payment_method_options": {
195
+ "card": {
196
+ "installments": null,
197
+ "mandate_options": null,
198
+ "network": null,
199
+ "request_three_d_secure": "automatic"
200
+ }
201
+ },
202
+ "payment_method_types": [
203
+ "card"
204
+ ],
205
+ "processing": null,
206
+ "receipt_email": null,
207
+ "review": null,
208
+ "setup_future_usage": null,
209
+ "shipping": null,
210
+ "source": null,
211
+ "statement_descriptor": null,
212
+ "statement_descriptor_suffix": null,
213
+ "status": "requires_payment_method",
214
+ "transfer_data": null,
215
+ "transfer_group": null
216
+ }
217
+ },
218
+ "livemode": false,
219
+ "pending_webhooks": 2,
220
+ "request": {
221
+ "id": "req_00000000000000",
222
+ "idempotency_key": "57ddc22f-1d42-446f-8f91-85cf0d32084a"
223
+ },
224
+ "type": "payment_intent.payment_failed"
225
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "id": "evt_00000000000000",
3
+ "object": "event",
4
+ "api_version": "2018-02-28",
5
+ "created": 1578499109,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_00000000000000",
9
+ "object": "payment_intent",
10
+ "allowed_source_types": ["card", "sepa_debit"],
11
+ "amount": 900,
12
+ "amount_capturable": 0,
13
+ "amount_received": 0,
14
+ "application": null,
15
+ "application_fee_amount": null,
16
+ "canceled_at": null,
17
+ "cancellation_reason": null,
18
+ "capture_method": "automatic",
19
+ "charges": {
20
+ "object": "list",
21
+ "data": [
22
+ {
23
+ "id": "ch_00000000000000",
24
+ "object": "charge",
25
+ "amount": 900,
26
+ "amount_refunded": 0,
27
+ "application": null,
28
+ "application_fee": null,
29
+ "application_fee_amount": null,
30
+ "balance_transaction": "txn_00000000000000",
31
+ "billing_details": {
32
+ "address": {
33
+ "city": null,
34
+ "country": "DE",
35
+ "line1": null,
36
+ "line2": null,
37
+ "postal_code": null,
38
+ "state": null
39
+ },
40
+ "email": null,
41
+ "name": null,
42
+ "phone": null
43
+ },
44
+ "captured": true,
45
+ "created": 1578499109,
46
+ "currency": "eur",
47
+ "customer": "cus_00000000000000",
48
+ "description": null,
49
+ "destination": "acct_00000000000000",
50
+ "dispute": null,
51
+ "disputed": false,
52
+ "failure_code": null,
53
+ "failure_message": null,
54
+ "fraud_details": {},
55
+ "invoice": null,
56
+ "livemode": false,
57
+ "metadata": {},
58
+ "on_behalf_of": null,
59
+ "order": null,
60
+ "outcome": {
61
+ "network_status": "approved_by_network",
62
+ "reason": null,
63
+ "risk_level": "normal",
64
+ "risk_score": 40,
65
+ "seller_message": "Payment complete.",
66
+ "type": "authorized"
67
+ },
68
+ "paid": false,
69
+ "payment_intent": "pi_00000000000000",
70
+ "payment_method": "pm_00000000000000",
71
+ "payment_method_details": {
72
+ "card": {
73
+ "brand": "visa",
74
+ "checks": {
75
+ "address_line1_check": null,
76
+ "address_postal_code_check": null,
77
+ "cvc_check": null
78
+ },
79
+ "country": "US",
80
+ "exp_month": 4,
81
+ "exp_year": 2024,
82
+ "fingerprint": "00000000000000",
83
+ "funding": "credit",
84
+ "installments": null,
85
+ "last4": "4242",
86
+ "network": "visa",
87
+ "three_d_secure": null,
88
+ "wallet": null
89
+ },
90
+ "type": "card"
91
+ },
92
+ "receipt_email": null,
93
+ "receipt_number": null,
94
+ "receipt_url": "https://pay.stripe.com/receipts/acct_00000000000000/ch_00000000000000/rcpt_00000000000000",
95
+ "refunded": false,
96
+ "refunds": {
97
+ "object": "list",
98
+ "data": [],
99
+ "has_more": false,
100
+ "total_count": 0,
101
+ "url": "/v1/charges/ch_00000000000000/refunds"
102
+ },
103
+ "review": null,
104
+ "shipping": null,
105
+ "source": null,
106
+ "source_transfer": null,
107
+ "statement_descriptor": "ACME Corp",
108
+ "statement_descriptor_suffix": null,
109
+ "status": "succeeded",
110
+ "transfer": "tr_00000000000000",
111
+ "transfer_data": {
112
+ "amount": null,
113
+ "destination": "acct_00000000000000"
114
+ },
115
+ "transfer_group": "group_pi_00000000000000"
116
+ }
117
+ ],
118
+ "has_more": false,
119
+ "total_count": 1,
120
+ "url": "/v1/charges?payment_intent=pi_00000000000000"
121
+ },
122
+ "client_secret": "pi_00000000000000",
123
+ "confirmation_method": "automatic",
124
+ "created": 1578499108,
125
+ "currency": "eur",
126
+ "customer": "cus_00000000000000",
127
+ "description": null,
128
+ "invoice": null,
129
+ "last_payment_error": null,
130
+ "livemode": false,
131
+ "metadata": {},
132
+ "next_action": null,
133
+ "next_source_action": null,
134
+ "on_behalf_of": null,
135
+ "payment_method": "pm_00000000000000",
136
+ "payment_method_options": {
137
+ "card": {
138
+ "installments": null,
139
+ "request_three_d_secure": "automatic"
140
+ }
141
+ },
142
+ "payment_method_types": ["card", "sepa_debit"],
143
+ "receipt_email": null,
144
+ "review": null,
145
+ "setup_future_usage": null,
146
+ "shipping": null,
147
+ "source": null,
148
+ "statement_descriptor": "ACME Corp",
149
+ "statement_descriptor_suffix": null,
150
+ "status": "processing",
151
+ "transfer_data": null,
152
+ "transfer_group": null
153
+ }
154
+ },
155
+ "livemode": false,
156
+ "pending_webhooks": 2,
157
+ "request": {
158
+ "id": "req_00000000000000",
159
+ "idempotency_key": null
160
+ },
161
+ "type": "payment_intent.processing"
162
+ }