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,191 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320004,
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": 1648320002,
48
+ "currency": "usd",
49
+ "customer": "cus_00000000000000",
50
+ "description": "Payment for Invoice",
51
+ "destination": null,
52
+ "dispute": null,
53
+ "disputed": false,
54
+ "failure_code": "authentication_required",
55
+ "failure_message": "Your card was declined. This transaction requires authentication.",
56
+ "fraud_details": {
57
+ },
58
+ "invoice": "in_000000000000000000000000",
59
+ "livemode": false,
60
+ "metadata": {
61
+ },
62
+ "on_behalf_of": null,
63
+ "order": null,
64
+ "outcome": {
65
+ "network_status": "declined_by_network",
66
+ "reason": "authentication_required",
67
+ "risk_level": "normal",
68
+ "risk_score": 15,
69
+ "seller_message": "The bank returned the decline code `authentication_required`.",
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": "pass"
82
+ },
83
+ "country": "IE",
84
+ "exp_month": 7,
85
+ "exp_year": 2025,
86
+ "fingerprint": "R0zFsMh6EQNC0f1H",
87
+ "funding": "credit",
88
+ "installments": null,
89
+ "last4": "3220",
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": 1648320001,
128
+ "currency": "usd",
129
+ "customer": "cus_00000000000000",
130
+ "description": "Payment for Invoice",
131
+ "invoice": "in_000000000000000000000000",
132
+ "last_payment_error": null,
133
+ "livemode": false,
134
+ "metadata": {
135
+ },
136
+ "next_action": {
137
+ "type": "use_stripe_sdk",
138
+ "use_stripe_sdk": {
139
+ "type": "stripe_3ds2_fingerprint",
140
+ "merchant": "acct_0000000000000000",
141
+ "three_d_secure_2_source": "src_000000000000000000000000",
142
+ "directory_server_name": "visa",
143
+ "server_transaction_id": "b973c110-2ca1-46fa-8bce-dc18259d145f",
144
+ "three_ds_method_url": "",
145
+ "three_ds_optimizations": "k",
146
+ "directory_server_encryption": {
147
+ "directory_server_id": "A000000003",
148
+ "algorithm": "RSA",
149
+ "certificate": "-----BEGIN CERTIFICATE-----\nMIIGAzCCA+ugAwIBAgIQDaAlB1IbPwgx5esGu9tLIjANBgkqhkiG9w0BAQsFADB2\nMQswCQYDVQQGEwJVUzENMAsGA1UECgwEVklTQTEvMC0GA1UECwwmVmlzYSBJbnRl\ncm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xJzAlBgNVBAMMHlZpc2EgZUNv\nbW1lcmNlIElzc3VpbmcgQ0EgLSBHMjAeFw0yMTA4MjMxNTMyMzNaFw0yNDA4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
159
+ "payment_method": "pm_000000000000000000000000",
160
+ "payment_method_options": {
161
+ "card": {
162
+ "installments": null,
163
+ "mandate_options": null,
164
+ "network": null,
165
+ "request_three_d_secure": "automatic"
166
+ }
167
+ },
168
+ "payment_method_types": [
169
+ "card"
170
+ ],
171
+ "processing": null,
172
+ "receipt_email": null,
173
+ "review": null,
174
+ "setup_future_usage": "off_session",
175
+ "shipping": null,
176
+ "source": null,
177
+ "statement_descriptor": null,
178
+ "statement_descriptor_suffix": null,
179
+ "status": "requires_action",
180
+ "transfer_data": null,
181
+ "transfer_group": null
182
+ }
183
+ },
184
+ "livemode": false,
185
+ "pending_webhooks": 2,
186
+ "request": {
187
+ "id": "req_00000000000000",
188
+ "idempotency_key": "4e03370d-8b01-4847-9891-0092e480e875"
189
+ },
190
+ "type": "payment_intent.requires_action"
191
+ }
@@ -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
+ }