stripe-ruby-mock 2.5.8 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/rspec_tests.yml +38 -0
  3. data/.gitignore +1 -1
  4. data/.rspec +2 -1
  5. data/CHANGELOG.md +77 -0
  6. data/Gemfile +1 -5
  7. data/README.md +19 -11
  8. data/lib/stripe_mock/api/client.rb +2 -2
  9. data/lib/stripe_mock/api/errors.rb +34 -28
  10. data/lib/stripe_mock/api/instance.rb +1 -1
  11. data/lib/stripe_mock/api/webhooks.rb +68 -24
  12. data/lib/stripe_mock/client.rb +2 -1
  13. data/lib/stripe_mock/data/list.rb +42 -9
  14. data/lib/stripe_mock/data.rb +359 -21
  15. data/lib/stripe_mock/instance.rb +23 -5
  16. data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
  17. data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
  18. data/lib/stripe_mock/request_handlers/balance_transactions.rb +2 -2
  19. data/lib/stripe_mock/request_handlers/charges.rb +31 -5
  20. data/lib/stripe_mock/request_handlers/checkout_session.rb +179 -0
  21. data/lib/stripe_mock/request_handlers/customers.rb +47 -19
  22. data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
  23. data/lib/stripe_mock/request_handlers/events.rb +30 -3
  24. data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
  25. data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +6 -0
  26. data/lib/stripe_mock/request_handlers/helpers/search_helpers.rb +67 -0
  27. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +36 -12
  28. data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +1 -1
  29. data/lib/stripe_mock/request_handlers/invoices.rb +26 -6
  30. data/lib/stripe_mock/request_handlers/payment_intents.rb +202 -0
  31. data/lib/stripe_mock/request_handlers/payment_methods.rb +124 -0
  32. data/lib/stripe_mock/request_handlers/plans.rb +1 -1
  33. data/lib/stripe_mock/request_handlers/prices.rb +71 -0
  34. data/lib/stripe_mock/request_handlers/products.rb +15 -5
  35. data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
  36. data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
  37. data/lib/stripe_mock/request_handlers/setup_intents.rb +100 -0
  38. data/lib/stripe_mock/request_handlers/sources.rb +12 -6
  39. data/lib/stripe_mock/request_handlers/subscriptions.rb +146 -25
  40. data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
  41. data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
  42. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +124 -9
  43. data/lib/stripe_mock/server.rb +2 -2
  44. data/lib/stripe_mock/test_strategies/base.rb +98 -12
  45. data/lib/stripe_mock/test_strategies/live.rb +23 -12
  46. data/lib/stripe_mock/test_strategies/mock.rb +6 -2
  47. data/lib/stripe_mock/version.rb +1 -1
  48. data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
  49. data/lib/stripe_mock/webhook_fixtures/balance.available.json +27 -15
  50. data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
  51. data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
  52. data/lib/stripe_mock/webhook_fixtures/charge.failed.json +101 -44
  53. data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
  54. data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
  55. data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
  56. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
  57. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
  58. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
  59. data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -45
  60. data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
  61. data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
  62. data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
  63. data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
  64. data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
  65. data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
  66. data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -46
  67. data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
  68. data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
  69. data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
  70. data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
  71. data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
  72. data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
  73. data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
  74. data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
  75. data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
  76. data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
  77. data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
  78. data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
  79. data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
  80. data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
  81. data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +225 -0
  82. data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
  83. data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
  84. data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +196 -0
  85. data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
  86. data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
  87. data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
  88. data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
  89. data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
  90. data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
  91. data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
  92. data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
  93. data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
  94. data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
  95. data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
  96. data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
  97. data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
  98. data/lib/stripe_mock/webhook_fixtures/product.created.json +40 -0
  99. data/lib/stripe_mock/webhook_fixtures/product.deleted.json +40 -0
  100. data/lib/stripe_mock/webhook_fixtures/product.updated.json +47 -0
  101. data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
  102. data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
  103. data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
  104. data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
  105. data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
  106. data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
  107. data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
  108. data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
  109. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
  110. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
  111. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
  112. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
  113. data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
  114. data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
  115. data/lib/stripe_mock.rb +11 -0
  116. data/spec/instance_spec.rb +13 -13
  117. data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
  118. data/spec/list_spec.rb +38 -0
  119. data/spec/readme_spec.rb +1 -1
  120. data/spec/server_spec.rb +6 -3
  121. data/spec/shared_stripe_examples/account_examples.rb +10 -2
  122. data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
  123. data/spec/shared_stripe_examples/balance_examples.rb +6 -0
  124. data/spec/shared_stripe_examples/balance_transaction_examples.rb +3 -3
  125. data/spec/shared_stripe_examples/bank_examples.rb +3 -3
  126. data/spec/shared_stripe_examples/bank_token_examples.rb +5 -7
  127. data/spec/shared_stripe_examples/card_examples.rb +4 -4
  128. data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
  129. data/spec/shared_stripe_examples/charge_examples.rb +106 -22
  130. data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
  131. data/spec/shared_stripe_examples/coupon_examples.rb +1 -1
  132. data/spec/shared_stripe_examples/customer_examples.rb +149 -53
  133. data/spec/shared_stripe_examples/dispute_examples.rb +2 -2
  134. data/spec/shared_stripe_examples/error_mock_examples.rb +8 -7
  135. data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
  136. data/spec/shared_stripe_examples/external_account_examples.rb +3 -3
  137. data/spec/shared_stripe_examples/invoice_examples.rb +148 -40
  138. data/spec/shared_stripe_examples/invoice_item_examples.rb +1 -1
  139. data/spec/shared_stripe_examples/payment_intent_examples.rb +283 -0
  140. data/spec/shared_stripe_examples/payment_method_examples.rb +454 -0
  141. data/spec/shared_stripe_examples/payout_examples.rb +2 -2
  142. data/spec/shared_stripe_examples/plan_examples.rb +135 -92
  143. data/spec/shared_stripe_examples/price_examples.rb +292 -0
  144. data/spec/shared_stripe_examples/product_examples.rb +215 -0
  145. data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
  146. data/spec/shared_stripe_examples/refund_examples.rb +38 -21
  147. data/spec/shared_stripe_examples/setup_intent_examples.rb +85 -0
  148. data/spec/shared_stripe_examples/subscription_examples.rb +706 -324
  149. data/spec/shared_stripe_examples/subscription_items_examples.rb +3 -2
  150. data/spec/shared_stripe_examples/transfer_examples.rb +16 -7
  151. data/spec/shared_stripe_examples/webhook_event_examples.rb +62 -16
  152. data/spec/spec_helper.rb +8 -5
  153. data/spec/stripe_mock_spec.rb +4 -4
  154. data/spec/support/shared_contexts/stripe_validator_spec.rb +8 -0
  155. data/spec/support/stripe_examples.rb +11 -1
  156. data/stripe-ruby-mock.gemspec +9 -5
  157. metadata +115 -47
  158. data/.travis.yml +0 -28
  159. data/spec/shared_stripe_examples/product_example.rb +0 -65
@@ -0,0 +1,196 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320033,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_000000000000000000000000",
9
+ "object": "payment_intent",
10
+ "amount": 2000,
11
+ "amount_capturable": 0,
12
+ "amount_received": 2000,
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": 2000,
27
+ "amount_refunded": 0,
28
+ "application": null,
29
+ "application_fee": null,
30
+ "application_fee_amount": null,
31
+ "balance_transaction": "txn_000000000000000000000000",
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": true,
47
+ "created": 1648320032,
48
+ "currency": "usd",
49
+ "customer": null,
50
+ "description": "(created by Stripe CLI)",
51
+ "destination": null,
52
+ "dispute": null,
53
+ "disputed": false,
54
+ "failure_code": null,
55
+ "failure_message": null,
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": "approved_by_network",
66
+ "reason": null,
67
+ "risk_level": "normal",
68
+ "risk_score": 2,
69
+ "seller_message": "Payment complete.",
70
+ "type": "authorized"
71
+ },
72
+ "paid": true,
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": "ZoVSX2dK5igWt2SB",
87
+ "funding": "credit",
88
+ "installments": null,
89
+ "last4": "4242",
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": "https://pay.stripe.com/receipts/acct_0000000000000000/ch_000000000000000000000000/rcpt_0000000000000000000000000000000",
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": {
112
+ "address": {
113
+ "city": "San Francisco",
114
+ "country": "US",
115
+ "line1": "510 Townsend St",
116
+ "line2": null,
117
+ "postal_code": "94103",
118
+ "state": "CA"
119
+ },
120
+ "carrier": null,
121
+ "name": "Jenny Rosen",
122
+ "phone": null,
123
+ "tracking_number": null
124
+ },
125
+ "source": null,
126
+ "source_transfer": null,
127
+ "statement_descriptor": null,
128
+ "statement_descriptor_suffix": null,
129
+ "status": "succeeded",
130
+ "transfer_data": null,
131
+ "transfer_group": null
132
+ }
133
+ ],
134
+ "has_more": false,
135
+ "total_count": 1,
136
+ "url": "/v1/charges?payment_intent=pi_000000000000000000000000"
137
+ },
138
+ "client_secret": "pi_000000000000000000000000_secret_0000000000000000000000000",
139
+ "confirmation_method": "automatic",
140
+ "created": 1648320032,
141
+ "currency": "usd",
142
+ "customer": null,
143
+ "description": "(created by Stripe CLI)",
144
+ "invoice": null,
145
+ "last_payment_error": null,
146
+ "livemode": false,
147
+ "metadata": {
148
+ },
149
+ "next_action": null,
150
+ "on_behalf_of": null,
151
+ "payment_method": "pm_000000000000000000000000",
152
+ "payment_method_options": {
153
+ "card": {
154
+ "installments": null,
155
+ "mandate_options": null,
156
+ "network": null,
157
+ "request_three_d_secure": "automatic"
158
+ }
159
+ },
160
+ "payment_method_types": [
161
+ "card"
162
+ ],
163
+ "processing": null,
164
+ "receipt_email": null,
165
+ "review": null,
166
+ "setup_future_usage": null,
167
+ "shipping": {
168
+ "address": {
169
+ "city": "San Francisco",
170
+ "country": "US",
171
+ "line1": "510 Townsend St",
172
+ "line2": null,
173
+ "postal_code": "94103",
174
+ "state": "CA"
175
+ },
176
+ "carrier": null,
177
+ "name": "Jenny Rosen",
178
+ "phone": null,
179
+ "tracking_number": null
180
+ },
181
+ "source": null,
182
+ "statement_descriptor": null,
183
+ "statement_descriptor_suffix": null,
184
+ "status": "succeeded",
185
+ "transfer_data": null,
186
+ "transfer_group": null
187
+ }
188
+ },
189
+ "livemode": false,
190
+ "pending_webhooks": 2,
191
+ "request": {
192
+ "id": "req_00000000000000",
193
+ "idempotency_key": "7143a956-2f40-407a-b312-43038ae76c86"
194
+ },
195
+ "type": "payment_intent.succeeded"
196
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320037,
6
+ "data": {
7
+ "object": {
8
+ "id": "plink_000000000000000000000000",
9
+ "object": "payment_link",
10
+ "active": true,
11
+ "after_completion": {
12
+ "hosted_confirmation": {
13
+ "custom_message": null
14
+ },
15
+ "type": "hosted_confirmation"
16
+ },
17
+ "allow_promotion_codes": false,
18
+ "application_fee_amount": null,
19
+ "application_fee_percent": null,
20
+ "automatic_tax": {
21
+ "enabled": false
22
+ },
23
+ "billing_address_collection": "auto",
24
+ "livemode": false,
25
+ "metadata": {
26
+ },
27
+ "on_behalf_of": null,
28
+ "payment_method_types": null,
29
+ "phone_number_collection": {
30
+ "enabled": false
31
+ },
32
+ "shipping_address_collection": null,
33
+ "subscription_data": {
34
+ "trial_period_days": null
35
+ },
36
+ "transfer_data": null,
37
+ "url": "https://buy.stripe.com/test_000000000000000000"
38
+ }
39
+ },
40
+ "livemode": false,
41
+ "pending_webhooks": 2,
42
+ "request": {
43
+ "id": "req_00000000000000",
44
+ "idempotency_key": "753b9128-4591-4a12-9392-86732e352266"
45
+ },
46
+ "type": "payment_link.created"
47
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320038,
6
+ "data": {
7
+ "object": {
8
+ "id": "plink_000000000000000000000000",
9
+ "object": "payment_link",
10
+ "active": true,
11
+ "after_completion": {
12
+ "hosted_confirmation": {
13
+ "custom_message": null
14
+ },
15
+ "type": "hosted_confirmation"
16
+ },
17
+ "allow_promotion_codes": true,
18
+ "application_fee_amount": null,
19
+ "application_fee_percent": null,
20
+ "automatic_tax": {
21
+ "enabled": false
22
+ },
23
+ "billing_address_collection": "auto",
24
+ "livemode": false,
25
+ "metadata": {
26
+ },
27
+ "on_behalf_of": null,
28
+ "payment_method_types": null,
29
+ "phone_number_collection": {
30
+ "enabled": false
31
+ },
32
+ "shipping_address_collection": null,
33
+ "subscription_data": {
34
+ "trial_period_days": null
35
+ },
36
+ "transfer_data": null,
37
+ "url": "https://buy.stripe.com/test_000000000000000000"
38
+ },
39
+ "previous_attributes": {
40
+ "allow_promotion_codes": false
41
+ }
42
+ },
43
+ "livemode": false,
44
+ "pending_webhooks": 2,
45
+ "request": {
46
+ "id": "req_00000000000000",
47
+ "idempotency_key": "81dafec6-4d31-4bc8-b45b-0ab21772c793"
48
+ },
49
+ "type": "payment_link.updated"
50
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320107,
6
+ "data": {
7
+ "object": {
8
+ "id": "card_000000000000000000000000",
9
+ "object": "payment_method",
10
+ "billing_details": {
11
+ "address": {
12
+ "city": null,
13
+ "country": null,
14
+ "line1": null,
15
+ "line2": null,
16
+ "postal_code": null,
17
+ "state": null
18
+ },
19
+ "email": null,
20
+ "name": null,
21
+ "phone": null
22
+ },
23
+ "card": {
24
+ "brand": "visa",
25
+ "checks": {
26
+ "address_line1_check": null,
27
+ "address_postal_code_check": null,
28
+ "cvc_check": null
29
+ },
30
+ "country": "US",
31
+ "exp_month": 3,
32
+ "exp_year": 2023,
33
+ "fingerprint": "ZoVSX2dK5igWt2SB",
34
+ "funding": "credit",
35
+ "generated_from": null,
36
+ "last4": "4242",
37
+ "networks": {
38
+ "available": [
39
+ "visa"
40
+ ],
41
+ "preferred": null
42
+ },
43
+ "three_d_secure_usage": {
44
+ "supported": true
45
+ },
46
+ "wallet": null
47
+ },
48
+ "created": 1648320107,
49
+ "customer": "cus_00000000000000",
50
+ "livemode": false,
51
+ "metadata": {
52
+ },
53
+ "type": "card"
54
+ }
55
+ },
56
+ "livemode": false,
57
+ "pending_webhooks": 2,
58
+ "request": {
59
+ "id": "req_00000000000000",
60
+ "idempotency_key": "381c7773-97ac-4c18-8fbe-e8bff5e6bbad"
61
+ },
62
+ "type": "payment_method.attached"
63
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320107,
6
+ "data": {
7
+ "object": {
8
+ "id" : "pm_000000000000000000000000",
9
+ "object" : "payment_method",
10
+ "created" : 1678559798,
11
+ "billing_details" : {
12
+ "address" : {
13
+ "city" : null,
14
+ "country" : "US",
15
+ "line1" : null,
16
+ "line2" : null,
17
+ "postal_code" : "42424",
18
+ "state" : null
19
+ },
20
+ "email" : null,
21
+ "name" : null,
22
+ "phone" : null
23
+ },
24
+ "card" : {
25
+ "brand" : "visa",
26
+ "checks" : {
27
+ "address_line1_check" : null,
28
+ "address_postal_code_check" : "pass",
29
+ "cvc_check" : "pass"
30
+ },
31
+ "country" : "US",
32
+ "exp_month" : 4,
33
+ "exp_year" : 2024,
34
+ "fingerprint" : "ZoVSX2dK5igWt2SB",
35
+ "funding" : "credit",
36
+ "generated_from" : null,
37
+ "last4" : "4242",
38
+ "networks" : {
39
+ "available" : [
40
+ "visa"
41
+ ],
42
+ "preferred" : null
43
+ },
44
+ "three_d_secure_usage" : {
45
+ "supported" : true
46
+ },
47
+ "wallet" : null
48
+ },
49
+ "customer" : null,
50
+ "livemode" : false,
51
+ "metadata" : {},
52
+ "type" : "card"
53
+ }
54
+ },
55
+ "livemode": false,
56
+ "pending_webhooks": 2,
57
+ "request": {
58
+ "id": "req_00000000000000",
59
+ "idempotency_key": "381c7773-97ac-4c18-8fbe-e8bff5e6bbad"
60
+ },
61
+ "type": "payment_method.detached"
62
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320045,
6
+ "data": {
7
+ "object": {
8
+ "id": "po_000000000000000000000000",
9
+ "object": "payout",
10
+ "amount": 1100,
11
+ "arrival_date": 1648425600,
12
+ "automatic": false,
13
+ "balance_transaction": "txn_000000000000000000000000",
14
+ "created": 1648320044,
15
+ "currency": "usd",
16
+ "description": "(created by Stripe CLI)",
17
+ "destination": "ba_000000000000000000000000",
18
+ "failure_balance_transaction": null,
19
+ "failure_code": null,
20
+ "failure_message": null,
21
+ "livemode": false,
22
+ "metadata": {
23
+ },
24
+ "method": "standard",
25
+ "original_payout": null,
26
+ "reversed_by": null,
27
+ "source_type": "card",
28
+ "statement_descriptor": null,
29
+ "status": "paid",
30
+ "type": "bank_account"
31
+ }
32
+ },
33
+ "livemode": false,
34
+ "pending_webhooks": 2,
35
+ "request": {
36
+ "id": "req_00000000000000",
37
+ "idempotency_key": "ae68e2e7-0edb-4181-a35f-f36dcc9148c9"
38
+ },
39
+ "type": "payout.created"
40
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320045,
6
+ "data": {
7
+ "object": {
8
+ "id": "po_000000000000000000000000",
9
+ "object": "payout",
10
+ "amount": 1100,
11
+ "arrival_date": 1648425600,
12
+ "automatic": false,
13
+ "balance_transaction": "txn_000000000000000000000000",
14
+ "created": 1648320044,
15
+ "currency": "usd",
16
+ "description": "(created by Stripe CLI)",
17
+ "destination": "ba_000000000000000000000000",
18
+ "failure_balance_transaction": null,
19
+ "failure_code": null,
20
+ "failure_message": null,
21
+ "livemode": false,
22
+ "metadata": {
23
+ },
24
+ "method": "standard",
25
+ "original_payout": null,
26
+ "reversed_by": null,
27
+ "source_type": "card",
28
+ "statement_descriptor": null,
29
+ "status": "paid",
30
+ "type": "bank_account"
31
+ }
32
+ },
33
+ "livemode": false,
34
+ "pending_webhooks": 2,
35
+ "request": {
36
+ "id": "req_00000000000000",
37
+ "idempotency_key": "ae68e2e7-0edb-4181-a35f-f36dcc9148c9"
38
+ },
39
+ "type": "payout.paid"
40
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320046,
6
+ "data": {
7
+ "object": {
8
+ "id": "po_000000000000000000000000",
9
+ "object": "payout",
10
+ "amount": 1100,
11
+ "arrival_date": 1648425600,
12
+ "automatic": false,
13
+ "balance_transaction": "txn_000000000000000000000000",
14
+ "created": 1648320044,
15
+ "currency": "usd",
16
+ "description": "(created by Stripe CLI)",
17
+ "destination": "ba_000000000000000000000000",
18
+ "failure_balance_transaction": null,
19
+ "failure_code": null,
20
+ "failure_message": null,
21
+ "livemode": false,
22
+ "metadata": {
23
+ "foo": "bar"
24
+ },
25
+ "method": "standard",
26
+ "original_payout": null,
27
+ "reversed_by": null,
28
+ "source_type": "card",
29
+ "statement_descriptor": null,
30
+ "status": "paid",
31
+ "type": "bank_account"
32
+ },
33
+ "previous_attributes": {
34
+ "metadata": {
35
+ "foo": null
36
+ }
37
+ }
38
+ },
39
+ "livemode": false,
40
+ "pending_webhooks": 2,
41
+ "request": {
42
+ "id": "req_00000000000000",
43
+ "idempotency_key": "0d30bd53-9777-49de-8893-882fd2914757"
44
+ },
45
+ "type": "payout.updated"
46
+ }
@@ -1,20 +1,37 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "plan.created",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320109,
7
6
  "data": {
8
7
  "object": {
9
- "interval": "month",
10
- "product": "pr_00000000000000",
11
- "amount": 100,
12
- "currency": "usd",
13
- "id": "fkx0AFo_00000000000000",
8
+ "id": "price_000000000000000000000000",
14
9
  "object": "plan",
15
- "livemode": false,
10
+ "active": true,
11
+ "aggregate_usage": null,
12
+ "amount": 1500,
13
+ "amount_decimal": "1500",
14
+ "billing_scheme": "per_unit",
15
+ "created": 1648320109,
16
+ "currency": "usd",
17
+ "interval": "month",
16
18
  "interval_count": 1,
17
- "trial_period_days": null
19
+ "livemode": false,
20
+ "metadata": {
21
+ },
22
+ "nickname": null,
23
+ "product": "prod_00000000000000",
24
+ "tiers_mode": null,
25
+ "transform_usage": null,
26
+ "trial_period_days": null,
27
+ "usage_type": "licensed"
18
28
  }
19
- }
20
- }
29
+ },
30
+ "livemode": false,
31
+ "pending_webhooks": 2,
32
+ "request": {
33
+ "id": "req_00000000000000",
34
+ "idempotency_key": "64c22132-7234-47d6-a803-4e34ac0e883b"
35
+ },
36
+ "type": "plan.created"
37
+ }
@@ -1,20 +1,37 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "plan.deleted",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320048,
7
6
  "data": {
8
7
  "object": {
9
- "interval": "month",
10
- "product": "pr_00000000000000",
11
- "amount": 100,
12
- "currency": "usd",
13
- "id": "fkx0AFo_00000000000000",
8
+ "id": "plan_00000000000000",
14
9
  "object": "plan",
15
- "livemode": false,
10
+ "active": false,
11
+ "aggregate_usage": null,
12
+ "amount": 2000,
13
+ "amount_decimal": "2000",
14
+ "billing_scheme": "per_unit",
15
+ "created": 1648320047,
16
+ "currency": "usd",
17
+ "interval": "month",
16
18
  "interval_count": 1,
17
- "trial_period_days": null
19
+ "livemode": false,
20
+ "metadata": {
21
+ },
22
+ "nickname": null,
23
+ "product": "prod_00000000000000",
24
+ "tiers_mode": null,
25
+ "transform_usage": null,
26
+ "trial_period_days": null,
27
+ "usage_type": "licensed"
18
28
  }
19
- }
20
- }
29
+ },
30
+ "livemode": false,
31
+ "pending_webhooks": 2,
32
+ "request": {
33
+ "id": "req_00000000000000",
34
+ "idempotency_key": null
35
+ },
36
+ "type": "plan.deleted"
37
+ }