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.
- checksums.yaml +5 -5
- data/.github/workflows/rspec_tests.yml +38 -0
- data/.rspec +2 -1
- data/CHANGELOG.md +62 -15
- data/Gemfile +1 -0
- data/README.md +5 -3
- data/lib/stripe_mock/api/client.rb +1 -1
- data/lib/stripe_mock/api/instance.rb +1 -1
- data/lib/stripe_mock/api/webhooks.rb +66 -25
- data/lib/stripe_mock/client.rb +2 -1
- data/lib/stripe_mock/data/list.rb +31 -6
- data/lib/stripe_mock/data.rb +201 -30
- data/lib/stripe_mock/instance.rb +12 -3
- data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
- data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
- data/lib/stripe_mock/request_handlers/charges.rb +11 -4
- data/lib/stripe_mock/request_handlers/checkout_session.rb +179 -0
- data/lib/stripe_mock/request_handlers/customers.rb +22 -13
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
- data/lib/stripe_mock/request_handlers/events.rb +30 -3
- data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +1 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +36 -12
- data/lib/stripe_mock/request_handlers/invoices.rb +10 -4
- data/lib/stripe_mock/request_handlers/payment_intents.rb +13 -2
- data/lib/stripe_mock/request_handlers/payment_methods.rb +11 -4
- data/lib/stripe_mock/request_handlers/prices.rb +62 -0
- data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
- data/lib/stripe_mock/request_handlers/setup_intents.rb +16 -9
- data/lib/stripe_mock/request_handlers/sources.rb +12 -6
- data/lib/stripe_mock/request_handlers/subscriptions.rb +120 -21
- data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
- data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +33 -4
- data/lib/stripe_mock/server.rb +2 -2
- data/lib/stripe_mock/test_strategies/base.rb +62 -10
- data/lib/stripe_mock/version.rb +1 -1
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/balance.available.json +27 -15
- data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +49 -120
- data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -46
- data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
- data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
- data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -47
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
- data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
- data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
- data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +225 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +196 -0
- data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
- data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
- data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
- data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
- data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
- data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
- data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
- data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
- data/lib/stripe_mock/webhook_fixtures/product.created.json +19 -13
- data/lib/stripe_mock/webhook_fixtures/product.deleted.json +20 -14
- data/lib/stripe_mock/webhook_fixtures/product.updated.json +24 -15
- data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
- data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
- data/lib/stripe_mock.rb +7 -1
- data/spec/instance_spec.rb +7 -7
- data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
- data/spec/list_spec.rb +23 -0
- data/spec/readme_spec.rb +1 -1
- data/spec/server_spec.rb +4 -2
- data/spec/shared_stripe_examples/account_examples.rb +9 -1
- data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
- data/spec/shared_stripe_examples/balance_examples.rb +6 -0
- data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
- data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
- data/spec/shared_stripe_examples/customer_examples.rb +11 -13
- data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +29 -8
- data/spec/shared_stripe_examples/payment_intent_examples.rb +74 -0
- data/spec/shared_stripe_examples/payment_method_examples.rb +336 -67
- data/spec/shared_stripe_examples/price_examples.rb +223 -0
- data/spec/shared_stripe_examples/product_examples.rb +1 -9
- data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
- data/spec/shared_stripe_examples/refund_examples.rb +13 -0
- data/spec/shared_stripe_examples/setup_intent_examples.rb +17 -0
- data/spec/shared_stripe_examples/subscription_examples.rb +327 -9
- data/spec/shared_stripe_examples/transfer_examples.rb +10 -1
- data/spec/shared_stripe_examples/webhook_event_examples.rb +51 -5
- data/spec/spec_helper.rb +4 -0
- data/spec/stripe_mock_spec.rb +2 -2
- data/spec/support/stripe_examples.rb +8 -2
- data/stripe-ruby-mock.gemspec +7 -2
- metadata +72 -15
- data/.travis.yml +0 -28
- data/lib/stripe_mock/request_handlers/checkout.rb +0 -15
- data/spec/shared_stripe_examples/checkout_examples.rb +0 -19
@@ -1,69 +1,164 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "charge.refunded",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648319949,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"id": "
|
8
|
+
"id": "ch_000000000000000000000000",
|
10
9
|
"object": "charge",
|
11
|
-
"
|
10
|
+
"amount": 100,
|
11
|
+
"amount_captured": 100,
|
12
|
+
"amount_refunded": 100,
|
13
|
+
"application": null,
|
14
|
+
"application_fee": null,
|
15
|
+
"application_fee_amount": null,
|
16
|
+
"balance_transaction": "txn_000000000000000000000000",
|
17
|
+
"billing_details": {
|
18
|
+
"address": {
|
19
|
+
"city": null,
|
20
|
+
"country": null,
|
21
|
+
"line1": null,
|
22
|
+
"line2": null,
|
23
|
+
"postal_code": null,
|
24
|
+
"state": null
|
25
|
+
},
|
26
|
+
"email": null,
|
27
|
+
"name": null,
|
28
|
+
"phone": null
|
29
|
+
},
|
30
|
+
"calculated_statement_descriptor": "EXAMPLECOMPANY",
|
31
|
+
"captured": true,
|
32
|
+
"created": 1648319947,
|
33
|
+
"currency": "usd",
|
34
|
+
"customer": null,
|
35
|
+
"description": "(created by Stripe CLI)",
|
36
|
+
"destination": null,
|
37
|
+
"dispute": null,
|
38
|
+
"disputed": false,
|
39
|
+
"failure_code": null,
|
40
|
+
"failure_message": null,
|
41
|
+
"fraud_details": {
|
42
|
+
},
|
43
|
+
"invoice": null,
|
12
44
|
"livemode": false,
|
45
|
+
"metadata": {
|
46
|
+
},
|
47
|
+
"on_behalf_of": null,
|
48
|
+
"order": null,
|
49
|
+
"outcome": {
|
50
|
+
"network_status": "approved_by_network",
|
51
|
+
"reason": null,
|
52
|
+
"risk_level": "normal",
|
53
|
+
"risk_score": 52,
|
54
|
+
"seller_message": "Payment complete.",
|
55
|
+
"type": "authorized"
|
56
|
+
},
|
13
57
|
"paid": true,
|
14
|
-
"
|
15
|
-
"
|
58
|
+
"payment_intent": null,
|
59
|
+
"payment_method": "card_000000000000000000000000",
|
60
|
+
"payment_method_details": {
|
61
|
+
"card": {
|
62
|
+
"brand": "visa",
|
63
|
+
"checks": {
|
64
|
+
"address_line1_check": null,
|
65
|
+
"address_postal_code_check": null,
|
66
|
+
"cvc_check": null
|
67
|
+
},
|
68
|
+
"country": "US",
|
69
|
+
"exp_month": 3,
|
70
|
+
"exp_year": 2023,
|
71
|
+
"fingerprint": "ZoVSX2dK5igWt2SB",
|
72
|
+
"funding": "credit",
|
73
|
+
"installments": null,
|
74
|
+
"last4": "4242",
|
75
|
+
"mandate": null,
|
76
|
+
"network": "visa",
|
77
|
+
"three_d_secure": null,
|
78
|
+
"wallet": null
|
79
|
+
},
|
80
|
+
"type": "card"
|
81
|
+
},
|
82
|
+
"receipt_email": null,
|
83
|
+
"receipt_number": null,
|
84
|
+
"receipt_url": "https://pay.stripe.com/receipts/acct_0000000000000000/ch_000000000000000000000000/rcpt_0000000000000000000000000000000",
|
16
85
|
"refunded": true,
|
86
|
+
"refunds": {
|
87
|
+
"object": "list",
|
88
|
+
"data": [
|
89
|
+
{
|
90
|
+
"id": "re_000000000000000000000000",
|
91
|
+
"object": "refund",
|
92
|
+
"amount": 100,
|
93
|
+
"balance_transaction": "txn_000000000000000000000000",
|
94
|
+
"charge": "ch_000000000000000000000000",
|
95
|
+
"created": 1648319949,
|
96
|
+
"currency": "usd",
|
97
|
+
"metadata": {
|
98
|
+
},
|
99
|
+
"payment_intent": null,
|
100
|
+
"reason": null,
|
101
|
+
"receipt_number": null,
|
102
|
+
"source_transfer_reversal": null,
|
103
|
+
"status": "succeeded",
|
104
|
+
"transfer_reversal": null
|
105
|
+
}
|
106
|
+
],
|
107
|
+
"has_more": false,
|
108
|
+
"total_count": 1,
|
109
|
+
"url": "/v1/charges/ch_000000000000000000000000/refunds"
|
110
|
+
},
|
111
|
+
"review": null,
|
112
|
+
"shipping": null,
|
17
113
|
"source": {
|
18
|
-
"id": "
|
114
|
+
"id": "card_000000000000000000000000",
|
19
115
|
"object": "card",
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"brand": "Visa",
|
23
|
-
"funding": "credit",
|
24
|
-
"exp_month": 12,
|
25
|
-
"exp_year": 2013,
|
26
|
-
"fingerprint": "wXWJT135mEK107G8",
|
27
|
-
"customer": "cus_00000000000000",
|
28
|
-
"country": "US",
|
29
|
-
"name": "Actual Nothing",
|
116
|
+
"address_city": null,
|
117
|
+
"address_country": null,
|
30
118
|
"address_line1": null,
|
119
|
+
"address_line1_check": null,
|
31
120
|
"address_line2": null,
|
32
|
-
"address_city": null,
|
33
121
|
"address_state": null,
|
34
122
|
"address_zip": null,
|
35
|
-
"
|
123
|
+
"address_zip_check": null,
|
124
|
+
"brand": "Visa",
|
125
|
+
"country": "US",
|
126
|
+
"customer": null,
|
36
127
|
"cvc_check": null,
|
37
|
-
"
|
38
|
-
"
|
128
|
+
"dynamic_last4": null,
|
129
|
+
"exp_month": 3,
|
130
|
+
"exp_year": 2023,
|
131
|
+
"fingerprint": "ZoVSX2dK5igWt2SB",
|
132
|
+
"funding": "credit",
|
133
|
+
"last4": "4242",
|
134
|
+
"metadata": {
|
135
|
+
},
|
136
|
+
"name": null,
|
137
|
+
"tokenization_method": null
|
39
138
|
},
|
40
|
-
"
|
139
|
+
"source_transfer": null,
|
140
|
+
"statement_descriptor": null,
|
141
|
+
"statement_descriptor_suffix": null,
|
142
|
+
"status": "succeeded",
|
143
|
+
"transfer_data": null,
|
144
|
+
"transfer_group": null
|
145
|
+
},
|
146
|
+
"previous_attributes": {
|
147
|
+
"amount_refunded": 0,
|
148
|
+
"refunded": false,
|
41
149
|
"refunds": {
|
42
|
-
"object": "list",
|
43
|
-
"total_count": 1,
|
44
|
-
"has_more": false,
|
45
150
|
"data": [
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
"object": "refund",
|
51
|
-
"balance_transaction": "txn_2hkjgg43ucu7K1",
|
52
|
-
"id": "re_00000000000000"
|
53
|
-
}
|
54
|
-
]
|
55
|
-
},
|
56
|
-
"balance_transaction": "txn_00000000000000",
|
57
|
-
"failure_message": null,
|
58
|
-
"failure_code": null,
|
59
|
-
"amount_refunded": 1000,
|
60
|
-
"customer": "cus_00000000000000",
|
61
|
-
"invoice": "in_00000000000000",
|
62
|
-
"description": null,
|
63
|
-
"dispute": null,
|
64
|
-
"metadata": {
|
65
|
-
},
|
66
|
-
"fee": 0
|
151
|
+
|
152
|
+
],
|
153
|
+
"total_count": 0
|
154
|
+
}
|
67
155
|
}
|
68
|
-
}
|
69
|
-
|
156
|
+
},
|
157
|
+
"livemode": false,
|
158
|
+
"pending_webhooks": 2,
|
159
|
+
"request": {
|
160
|
+
"id": "req_00000000000000",
|
161
|
+
"idempotency_key": "86a8299a-3f47-4aec-8cb4-298bbc8bc050"
|
162
|
+
},
|
163
|
+
"type": "charge.refunded"
|
164
|
+
}
|
@@ -1,55 +1,126 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "charge.succeeded",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320032,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"id": "
|
8
|
+
"id": "ch_000000000000000000000000",
|
10
9
|
"object": "charge",
|
11
|
-
"
|
10
|
+
"amount": 2000,
|
11
|
+
"amount_captured": 2000,
|
12
|
+
"amount_refunded": 0,
|
13
|
+
"application": null,
|
14
|
+
"application_fee": null,
|
15
|
+
"application_fee_amount": null,
|
16
|
+
"balance_transaction": "txn_000000000000000000000000",
|
17
|
+
"billing_details": {
|
18
|
+
"address": {
|
19
|
+
"city": null,
|
20
|
+
"country": null,
|
21
|
+
"line1": null,
|
22
|
+
"line2": null,
|
23
|
+
"postal_code": null,
|
24
|
+
"state": null
|
25
|
+
},
|
26
|
+
"email": null,
|
27
|
+
"name": null,
|
28
|
+
"phone": null
|
29
|
+
},
|
30
|
+
"calculated_statement_descriptor": "EXAMPLECOMPANY",
|
31
|
+
"captured": true,
|
32
|
+
"created": 1648320032,
|
33
|
+
"currency": "usd",
|
34
|
+
"customer": null,
|
35
|
+
"description": "(created by Stripe CLI)",
|
36
|
+
"destination": null,
|
37
|
+
"dispute": null,
|
38
|
+
"disputed": false,
|
39
|
+
"failure_code": null,
|
40
|
+
"failure_message": null,
|
41
|
+
"fraud_details": {
|
42
|
+
},
|
43
|
+
"invoice": null,
|
12
44
|
"livemode": false,
|
45
|
+
"metadata": {
|
46
|
+
},
|
47
|
+
"on_behalf_of": null,
|
48
|
+
"order": null,
|
49
|
+
"outcome": {
|
50
|
+
"network_status": "approved_by_network",
|
51
|
+
"reason": null,
|
52
|
+
"risk_level": "normal",
|
53
|
+
"risk_score": 2,
|
54
|
+
"seller_message": "Payment complete.",
|
55
|
+
"type": "authorized"
|
56
|
+
},
|
13
57
|
"paid": true,
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
"
|
37
|
-
"address_zip_check": null
|
58
|
+
"payment_intent": "pi_000000000000000000000000",
|
59
|
+
"payment_method": "pm_000000000000000000000000",
|
60
|
+
"payment_method_details": {
|
61
|
+
"card": {
|
62
|
+
"brand": "visa",
|
63
|
+
"checks": {
|
64
|
+
"address_line1_check": null,
|
65
|
+
"address_postal_code_check": null,
|
66
|
+
"cvc_check": null
|
67
|
+
},
|
68
|
+
"country": "US",
|
69
|
+
"exp_month": 3,
|
70
|
+
"exp_year": 2023,
|
71
|
+
"fingerprint": "ZoVSX2dK5igWt2SB",
|
72
|
+
"funding": "credit",
|
73
|
+
"installments": null,
|
74
|
+
"last4": "4242",
|
75
|
+
"mandate": null,
|
76
|
+
"network": "visa",
|
77
|
+
"three_d_secure": null,
|
78
|
+
"wallet": null
|
79
|
+
},
|
80
|
+
"type": "card"
|
38
81
|
},
|
39
|
-
"
|
82
|
+
"receipt_email": null,
|
83
|
+
"receipt_number": null,
|
84
|
+
"receipt_url": "https://pay.stripe.com/receipts/acct_0000000000000000/ch_000000000000000000000000/rcpt_0000000000000000000000000000000",
|
85
|
+
"refunded": false,
|
40
86
|
"refunds": {
|
87
|
+
"object": "list",
|
88
|
+
"data": [
|
41
89
|
|
90
|
+
],
|
91
|
+
"has_more": false,
|
92
|
+
"total_count": 0,
|
93
|
+
"url": "/v1/charges/ch_000000000000000000000000/refunds"
|
42
94
|
},
|
43
|
-
"
|
44
|
-
"
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
95
|
+
"review": null,
|
96
|
+
"shipping": {
|
97
|
+
"address": {
|
98
|
+
"city": "San Francisco",
|
99
|
+
"country": "US",
|
100
|
+
"line1": "510 Townsend St",
|
101
|
+
"line2": null,
|
102
|
+
"postal_code": "94103",
|
103
|
+
"state": "CA"
|
104
|
+
},
|
105
|
+
"carrier": null,
|
106
|
+
"name": "Jenny Rosen",
|
107
|
+
"phone": null,
|
108
|
+
"tracking_number": null
|
109
|
+
},
|
110
|
+
"source": null,
|
111
|
+
"source_transfer": null,
|
112
|
+
"statement_descriptor": null,
|
113
|
+
"statement_descriptor_suffix": null,
|
114
|
+
"status": "succeeded",
|
115
|
+
"transfer_data": null,
|
116
|
+
"transfer_group": null
|
53
117
|
}
|
54
|
-
}
|
55
|
-
|
118
|
+
},
|
119
|
+
"livemode": false,
|
120
|
+
"pending_webhooks": 2,
|
121
|
+
"request": {
|
122
|
+
"id": "req_00000000000000",
|
123
|
+
"idempotency_key": "7143a956-2f40-407a-b312-43038ae76c86"
|
124
|
+
},
|
125
|
+
"type": "charge.succeeded"
|
126
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648319959,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "cs_test_0000000000000000000000000000000000000000000000000000000000",
|
9
|
+
"object": "checkout.session",
|
10
|
+
"after_expiration": null,
|
11
|
+
"allow_promotion_codes": null,
|
12
|
+
"amount_subtotal": 3000,
|
13
|
+
"amount_total": 3000,
|
14
|
+
"automatic_tax": {
|
15
|
+
"enabled": false,
|
16
|
+
"status": null
|
17
|
+
},
|
18
|
+
"billing_address_collection": null,
|
19
|
+
"cancel_url": "https://httpbin.org/post",
|
20
|
+
"client_reference_id": null,
|
21
|
+
"consent": null,
|
22
|
+
"consent_collection": null,
|
23
|
+
"currency": "usd",
|
24
|
+
"customer": "cus_00000000000000",
|
25
|
+
"customer_creation": "always",
|
26
|
+
"customer_details": {
|
27
|
+
"email": "stripe@example.com",
|
28
|
+
"phone": null,
|
29
|
+
"tax_exempt": "none",
|
30
|
+
"tax_ids": [
|
31
|
+
|
32
|
+
]
|
33
|
+
},
|
34
|
+
"customer_email": null,
|
35
|
+
"expires_at": 1648406355,
|
36
|
+
"livemode": false,
|
37
|
+
"locale": null,
|
38
|
+
"metadata": {
|
39
|
+
},
|
40
|
+
"mode": "payment",
|
41
|
+
"payment_intent": "pi_000000000000000000000000",
|
42
|
+
"payment_link": null,
|
43
|
+
"payment_method_options": {
|
44
|
+
},
|
45
|
+
"payment_method_types": [
|
46
|
+
"card"
|
47
|
+
],
|
48
|
+
"payment_status": "paid",
|
49
|
+
"phone_number_collection": {
|
50
|
+
"enabled": false
|
51
|
+
},
|
52
|
+
"recovered_from": null,
|
53
|
+
"setup_intent": null,
|
54
|
+
"shipping": null,
|
55
|
+
"shipping_address_collection": null,
|
56
|
+
"shipping_options": [
|
57
|
+
|
58
|
+
],
|
59
|
+
"shipping_rate": null,
|
60
|
+
"status": "complete",
|
61
|
+
"submit_type": null,
|
62
|
+
"subscription": null,
|
63
|
+
"success_url": "https://httpbin.org/post",
|
64
|
+
"total_details": {
|
65
|
+
"amount_discount": 0,
|
66
|
+
"amount_shipping": 0,
|
67
|
+
"amount_tax": 0
|
68
|
+
},
|
69
|
+
"url": null
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"livemode": false,
|
73
|
+
"pending_webhooks": 2,
|
74
|
+
"request": {
|
75
|
+
"id": null,
|
76
|
+
"idempotency_key": null
|
77
|
+
},
|
78
|
+
"type": "checkout.session.completed"
|
79
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "checkout.session.completed",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "cs_00000000000000",
|
10
|
+
"object": "checkout.session",
|
11
|
+
"allow_promotion_codes": null,
|
12
|
+
"amount_subtotal": 25000,
|
13
|
+
"amount_total": 25000,
|
14
|
+
"automatic_tax": {
|
15
|
+
"enabled": false,
|
16
|
+
"status": null
|
17
|
+
},
|
18
|
+
"billing_address_collection": null,
|
19
|
+
"cancel_url": "https://example.com/cancel",
|
20
|
+
"client_reference_id": null,
|
21
|
+
"currency": "usd",
|
22
|
+
"customer": "cus_00000000000000",
|
23
|
+
"customer_details": {
|
24
|
+
"email": "example@example.com",
|
25
|
+
"tax_exempt": "none",
|
26
|
+
"tax_ids": []
|
27
|
+
},
|
28
|
+
"customer_email": null,
|
29
|
+
"livemode": false,
|
30
|
+
"locale": null,
|
31
|
+
"metadata": {},
|
32
|
+
"mode": "payment",
|
33
|
+
"payment_intent": "pi_00000000000000",
|
34
|
+
"payment_method_options": {},
|
35
|
+
"payment_method_types": [
|
36
|
+
"card"
|
37
|
+
],
|
38
|
+
"payment_status": "paid",
|
39
|
+
"setup_intent": null,
|
40
|
+
"shipping": null,
|
41
|
+
"shipping_address_collection": null,
|
42
|
+
"submit_type": null,
|
43
|
+
"subscription": null,
|
44
|
+
"success_url": "https://example.com/success",
|
45
|
+
"total_details": {
|
46
|
+
"amount_discount": 0,
|
47
|
+
"amount_shipping": 0,
|
48
|
+
"amount_tax": 0
|
49
|
+
},
|
50
|
+
"url": null
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "checkout.session.completed",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "cs_00000000000000",
|
10
|
+
"object": "checkout.session",
|
11
|
+
"allow_promotion_codes": null,
|
12
|
+
"amount_subtotal": null,
|
13
|
+
"amount_total": null,
|
14
|
+
"automatic_tax": {
|
15
|
+
"enabled": false,
|
16
|
+
"status": null
|
17
|
+
},
|
18
|
+
"billing_address_collection": null,
|
19
|
+
"cancel_url": "https://example.com/cancel",
|
20
|
+
"client_reference_id": null,
|
21
|
+
"currency": null,
|
22
|
+
"customer": null,
|
23
|
+
"customer_details": null,
|
24
|
+
"customer_email": null,
|
25
|
+
"livemode": false,
|
26
|
+
"locale": null,
|
27
|
+
"metadata": {},
|
28
|
+
"mode": "setup",
|
29
|
+
"payment_intent": null,
|
30
|
+
"payment_method_options": {},
|
31
|
+
"payment_method_types": [
|
32
|
+
"card"
|
33
|
+
],
|
34
|
+
"payment_status": "no_payment_required",
|
35
|
+
"setup_intent": "seti_00000000000000",
|
36
|
+
"shipping": null,
|
37
|
+
"shipping_address_collection": null,
|
38
|
+
"submit_type": null,
|
39
|
+
"subscription": null,
|
40
|
+
"success_url": "https://example.com/success",
|
41
|
+
"total_details": null,
|
42
|
+
"url": null
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
@@ -1,55 +1,46 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "customer.created",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320107,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"object": "customer",
|
10
|
-
"created": 1375148334,
|
11
8
|
"id": "cus_00000000000000",
|
9
|
+
"object": "customer",
|
10
|
+
"address": null,
|
11
|
+
"balance": 0,
|
12
|
+
"created": 1648320107,
|
13
|
+
"currency": null,
|
14
|
+
"default_source": "card_000000000000000000000000",
|
15
|
+
"delinquent": false,
|
16
|
+
"description": "(created by Stripe CLI)",
|
17
|
+
"discount": null,
|
18
|
+
"email": null,
|
19
|
+
"invoice_prefix": "985BA9CB",
|
20
|
+
"invoice_settings": {
|
21
|
+
"custom_fields": null,
|
22
|
+
"default_payment_method": null,
|
23
|
+
"footer": null
|
24
|
+
},
|
12
25
|
"livemode": false,
|
13
|
-
"description": null,
|
14
|
-
"email": "bond@mailinator.com",
|
15
|
-
"delinquent": true,
|
16
26
|
"metadata": {
|
17
27
|
},
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
{
|
28
|
-
"id": "cc_2I2akIhmladin5",
|
29
|
-
"object": "card",
|
30
|
-
"last4": "0341",
|
31
|
-
"type": "Visa",
|
32
|
-
"brand": "Visa",
|
33
|
-
"funding": "credit",
|
34
|
-
"exp_month": 12,
|
35
|
-
"exp_year": 2013,
|
36
|
-
"fingerprint": "fWvZEzdbEIFF8QrK",
|
37
|
-
"customer": "cus_2I2AhGQOPmEFeu",
|
38
|
-
"country": "US",
|
39
|
-
"name": "Johnny Goodman",
|
40
|
-
"address_line1": null,
|
41
|
-
"address_line2": null,
|
42
|
-
"address_city": null,
|
43
|
-
"address_state": null,
|
44
|
-
"address_zip": null,
|
45
|
-
"address_country": null,
|
46
|
-
"cvc_check": "pass",
|
47
|
-
"address_line1_check": null,
|
48
|
-
"address_zip_check": null
|
49
|
-
}
|
50
|
-
]
|
51
|
-
},
|
52
|
-
"default_card": "cc_2I2akIhmladin5"
|
28
|
+
"name": null,
|
29
|
+
"next_invoice_sequence": 1,
|
30
|
+
"phone": null,
|
31
|
+
"preferred_locales": [
|
32
|
+
|
33
|
+
],
|
34
|
+
"shipping": null,
|
35
|
+
"tax_exempt": "none",
|
36
|
+
"test_clock": null
|
53
37
|
}
|
54
|
-
}
|
55
|
-
|
38
|
+
},
|
39
|
+
"livemode": false,
|
40
|
+
"pending_webhooks": 2,
|
41
|
+
"request": {
|
42
|
+
"id": "req_00000000000000",
|
43
|
+
"idempotency_key": "381c7773-97ac-4c18-8fbe-e8bff5e6bbad"
|
44
|
+
},
|
45
|
+
"type": "customer.created"
|
46
|
+
}
|