stripe_model_callbacks 0.1.7 → 0.1.9

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/Rakefile +1 -1
  4. data/app/models/stripe_model_callbacks/application_record.rb +28 -14
  5. data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
  6. data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +154 -8
  7. data/app/services/stripe_model_callbacks/base_service.rb +9 -6
  8. data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +3 -3
  9. data/app/services/stripe_model_callbacks/charge/updated_service.rb +5 -5
  10. data/app/services/stripe_model_callbacks/configure_service.rb +58 -27
  11. data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
  12. data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
  13. data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +3 -3
  14. data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +2 -2
  15. data/app/services/stripe_model_callbacks/customer/updated_service.rb +2 -2
  16. data/app/services/stripe_model_callbacks/event_mocker_service.rb +14 -8
  17. data/app/services/stripe_model_callbacks/invoice/updated_service.rb +4 -4
  18. data/app/services/stripe_model_callbacks/payment_intent/updated_service.rb +19 -0
  19. data/app/services/stripe_model_callbacks/payment_method/updated_service.rb +19 -0
  20. data/app/services/stripe_model_callbacks/payout/updated_service.rb +3 -3
  21. data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
  22. data/app/services/stripe_model_callbacks/price/updated_service.rb +1 -1
  23. data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
  24. data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
  25. data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
  26. data/app/services/stripe_model_callbacks/setup_intent/updated_service.rb +8 -0
  27. data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
  28. data/app/services/stripe_model_callbacks/source/transaction_created_service.rb +17 -0
  29. data/app/services/stripe_model_callbacks/source/updated_service.rb +4 -4
  30. data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +1 -1
  31. data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +1 -1
  32. data/app/services/stripe_model_callbacks/sync_everything.rb +17 -2
  33. data/app/services/stripe_model_callbacks/sync_from_stripe.rb +1 -1
  34. data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +3 -3
  35. data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
  36. data/config/rails_best_practices.yml +1 -0
  37. data/db/migrate/20180206151132_change_activities_trackable_id_to_string.rb +1 -1
  38. data/db/migrate/20180208091647_change_stripe_subscription_items_quantity_to_integer.rb +1 -1
  39. data/db/migrate/20181219121712_add_new_primary_id_and_rename_old.rb +2 -2
  40. data/db/migrate/20230210081405_create_stripe_setup_intents.rb +28 -0
  41. data/db/migrate/20230331182902_add_amount_captured_to_stripe_charges.rb +6 -0
  42. data/db/migrate/20230420092307_create_stripe_payment_methods.rb +15 -0
  43. data/db/migrate/20230421072509_create_stripe_payment_intents.rb +44 -0
  44. data/db/migrate/20230422074329_add_payment_intent_to_stripe_charges.rb +6 -0
  45. data/db/migrate/20230422175529_add_payment_intent_to_stripe_refunds.rb +6 -0
  46. data/db/migrate/20230422180602_change_stripe_refunds_stripe_charge_id_to_nullable.rb +5 -0
  47. data/db/migrate/20230518072538_change_stripe_setup_intents_payment_method_to_string.rb +7 -0
  48. data/lib/stripe_model_callbacks/configuration.rb +1 -1
  49. data/lib/stripe_model_callbacks/event_mocker.rb +1 -1
  50. data/lib/stripe_model_callbacks/factories/stripe_charges.rb +10 -0
  51. data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +10 -9
  52. data/lib/stripe_model_callbacks/factories/stripe_customers.rb +6 -4
  53. data/lib/stripe_model_callbacks/factories/stripe_invoice_items.rb +1 -0
  54. data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +1 -0
  55. data/lib/stripe_model_callbacks/factories/stripe_payment_intents.rb +17 -0
  56. data/lib/stripe_model_callbacks/factories/stripe_payment_methods.rb +15 -0
  57. data/lib/stripe_model_callbacks/factories/stripe_plans.rb +9 -12
  58. data/lib/stripe_model_callbacks/factories/stripe_products.rb +9 -8
  59. data/lib/stripe_model_callbacks/factories/stripe_recipients.rb +2 -0
  60. data/lib/stripe_model_callbacks/factories/stripe_reviews.rb +2 -0
  61. data/lib/stripe_model_callbacks/factories/stripe_setup_intents.rb +7 -0
  62. data/lib/stripe_model_callbacks/factories/stripe_skus.rb +1 -0
  63. data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +7 -7
  64. data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +10 -12
  65. data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +10 -0
  66. data/lib/stripe_model_callbacks/factories/stripe_transfers.rb +2 -0
  67. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +1 -0
  68. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +0 -1
  69. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.amount_capturable_updated.json +66 -0
  70. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.canceled.json +66 -0
  71. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.created.json +66 -0
  72. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.partially_funded.json +66 -0
  73. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.payment_failed.json +66 -0
  74. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.processing.json +66 -0
  75. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.requires_action.json +66 -0
  76. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.succeeded.json +66 -0
  77. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.attached.json +63 -0
  78. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.automatically_updated.json +63 -0
  79. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.card_automatically_updated.json +63 -0
  80. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.detached.json +63 -0
  81. data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.updated.json +63 -0
  82. data/lib/stripe_model_callbacks/fixtures/stripe_events/setup_intent/setup_intent.created.json +47 -0
  83. data/lib/stripe_model_callbacks/fixtures/stripe_events/setup_intent/setup_intent.updated.json +47 -0
  84. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/{source.transaction_created.json → source.transaction.created.json} +2 -1
  85. data/lib/stripe_model_callbacks/models/stripe_charge.rb +51 -4
  86. data/lib/stripe_model_callbacks/models/stripe_coupon.rb +12 -0
  87. data/lib/stripe_model_callbacks/models/stripe_customer.rb +12 -0
  88. data/lib/stripe_model_callbacks/models/stripe_invoice.rb +17 -1
  89. data/lib/stripe_model_callbacks/models/stripe_payment_intent.rb +125 -0
  90. data/lib/stripe_model_callbacks/models/stripe_payment_method.rb +31 -0
  91. data/lib/stripe_model_callbacks/models/stripe_plan.rb +13 -0
  92. data/lib/stripe_model_callbacks/models/stripe_product.rb +10 -0
  93. data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -1
  94. data/lib/stripe_model_callbacks/models/stripe_refund.rb +3 -1
  95. data/lib/stripe_model_callbacks/models/stripe_setup_intent.rb +21 -0
  96. data/lib/stripe_model_callbacks/models/stripe_source.rb +2 -1
  97. data/lib/stripe_model_callbacks/models/stripe_subscription.rb +23 -4
  98. data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +28 -2
  99. data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +2 -2
  100. data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +1 -1
  101. data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +6 -0
  102. data/lib/stripe_model_callbacks/version.rb +1 -1
  103. data/lib/stripe_model_callbacks.rb +1 -1
  104. metadata +47 -14
@@ -0,0 +1,17 @@
1
+ FactoryBot.define do
2
+ factory :stripe_payment_intent do
3
+ amount { 125_00 }
4
+ currency { "usd" }
5
+ sequence(:stripe_id) { |n| "stripe-payment-intent-#{n}" }
6
+
7
+ trait :with_conditional_stripe_mock do
8
+ after :create do |stripe_payment_intent|
9
+ stripe_payment_intent.create_stripe_mock! if StripeMock.instance
10
+ end
11
+ end
12
+
13
+ trait :with_stripe_mock do
14
+ after :create, &:create_stripe_mock!
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ FactoryBot.define do
2
+ factory :stripe_payment_method do
3
+ sequence(:stripe_id) { |n| "stripe-payment-method-#{n}" }
4
+
5
+ trait :with_conditional_stripe_mock do
6
+ after :create do |stripe_payment_method|
7
+ stripe_payment_method.create_stripe_mock! if StripeMock.instance
8
+ end
9
+ end
10
+
11
+ trait :with_stripe_mock do
12
+ after :create, &:create_stripe_mock!
13
+ end
14
+ end
15
+ end
@@ -9,21 +9,18 @@ FactoryBot.define do
9
9
  livemode { false }
10
10
  stripe_product
11
11
 
12
- trait :with_stripe_mock do
13
- association :stripe_product, factory: [:stripe_product, :with_stripe_mock]
12
+ trait :with_conditional_stripe_mock do
13
+ association :stripe_product, factory: [:stripe_product, :with_conditional_stripe_mock]
14
14
 
15
15
  after :create do |stripe_plan|
16
- mock_plan = Stripe::Plan.create(
17
- id: stripe_plan.stripe_id,
18
- amount: stripe_plan.amount_cents,
19
- currency: stripe_plan.currency,
20
- interval: stripe_plan.interval,
21
- interval_count: stripe_plan.interval_count,
22
- product: stripe_plan.stripe_product.stripe_id
23
- )
24
- stripe_plan.assign_from_stripe(mock_plan)
25
- stripe_plan.save!
16
+ stripe_plan.create_stripe_mock! if StripeMock.instance
26
17
  end
27
18
  end
19
+
20
+ trait :with_stripe_mock do
21
+ association :stripe_product, factory: [:stripe_product, :with_stripe_mock]
22
+
23
+ after :create, &:create_stripe_mock!
24
+ end
28
25
  end
29
26
  end
@@ -2,17 +2,18 @@ FactoryBot.define do
2
2
  factory :stripe_product do
3
3
  sequence(:name) { |n| "Stripe product #{n}" }
4
4
  sequence(:stripe_id) { |n| "stripe-product-#{n}" }
5
+ active { false }
6
+ livemode { false }
7
+ shippable { false }
5
8
 
6
- trait :with_stripe_mock do
9
+ trait :with_conditional_stripe_mock do
7
10
  after :create do |stripe_product|
8
- mock_product = Stripe::Product.create(
9
- id: stripe_product.stripe_id,
10
- name: stripe_product.name,
11
- type: "service"
12
- )
13
- stripe_product.assign_from_stripe(mock_product)
14
- stripe_product.save!
11
+ stripe_product.create_stripe_mock! if StripeMock.instance
15
12
  end
16
13
  end
14
+
15
+ trait :with_stripe_mock do
16
+ after :create, &:create_stripe_mock!
17
+ end
17
18
  end
18
19
  end
@@ -1,5 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :stripe_recipient do
3
3
  sequence(:stripe_id) { |n| "stripe-recipient-#{n}" }
4
+ livemode { false }
5
+ verified { false }
4
6
  end
5
7
  end
@@ -2,5 +2,7 @@ FactoryBot.define do
2
2
  factory :stripe_review do
3
3
  sequence(:stripe_id) { |n| "stripe-review-#{n}" }
4
4
  stripe_charge
5
+ livemode { false }
6
+ open { true }
5
7
  end
6
8
  end
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :stripe_setup_intent do
3
+ sequence(:stripe_id) { |n| "stripe-setup-intent-#{n}" }
4
+ stripe_customer
5
+ livemode { false }
6
+ end
7
+ end
@@ -1,6 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :stripe_sku do
3
3
  sequence(:stripe_id) { |n| "stripe-sku-#{n}" }
4
+ active { false }
4
5
  price { Money.new(10_000, "USD") }
5
6
  currency { "usd" }
6
7
  end
@@ -4,16 +4,16 @@ FactoryBot.define do
4
4
  stripe_subscription
5
5
  stripe_plan
6
6
  quantity { 1 }
7
+ deleted { false }
7
8
 
8
- trait :with_stripe_mock do
9
+ trait :with_conditional_stripe_mock do
9
10
  after :build do |item|
10
- mock_item = Stripe::SubscriptionItem.create(
11
- subscription: item.stripe_subscription.stripe_id,
12
- plan: item.stripe_plan.stripe_id,
13
- quantity: item.quantity
14
- )
15
- item.assign_from_stripe(mock_item)
11
+ item.create_stripe_mock! if StripeMock.instance
16
12
  end
17
13
  end
14
+
15
+ trait :with_stripe_mock do
16
+ after :build, &:create_stripe_mock!
17
+ end
18
18
  end
19
19
  end
@@ -19,22 +19,20 @@ FactoryBot.define do
19
19
  cancel_at_period_end { true }
20
20
  end
21
21
 
22
- trait :with_stripe_mock do
23
- association :stripe_customer, factory: [:stripe_customer, :with_stripe_mock]
24
- association :stripe_plan, factory: [:stripe_plan, :with_stripe_mock]
22
+ trait :with_conditional_stripe_mock do
23
+ association :stripe_customer, factory: [:stripe_customer, :with_conditional_stripe_mock]
24
+ association :stripe_plan, factory: [:stripe_plan, :with_conditional_stripe_mock]
25
25
 
26
26
  after :create do |stripe_subscription|
27
- cancel_at_period_end = stripe_subscription.cancel_at_period_end?
27
+ stripe_subscription.create_stripe_mock! if StripeMock.instance
28
+ end
29
+ end
28
30
 
29
- mock_subscription = Stripe::Subscription.create(
30
- customer: stripe_subscription.stripe_customer.stripe_id,
31
- plan: stripe_subscription.stripe_plan.stripe_id
32
- )
33
- stripe_subscription.assign_from_stripe(mock_subscription)
34
- stripe_subscription.save!
31
+ trait :with_stripe_mock do
32
+ association :stripe_customer, factory: [:stripe_customer, :with_stripe_mock]
33
+ association :stripe_plan, factory: [:stripe_plan, :with_stripe_mock]
35
34
 
36
- stripe_subscription.cancel!(at_period_end: true) if cancel_at_period_end
37
- end
35
+ after :create, &:create_stripe_mock!
38
36
  end
39
37
  end
40
38
  end
@@ -1,5 +1,15 @@
1
1
  FactoryBot.define do
2
2
  factory :stripe_tax_rate do
3
3
  sequence(:stripe_id) { |n| "stripe-tax-rate-#{n}" }
4
+
5
+ trait :with_conditional_stripe_mock do
6
+ after :create do |stripe_tax_rate|
7
+ stripe_tax_rate.create_stripe_mock! if StripeMock.instance
8
+ end
9
+ end
10
+
11
+ trait :with_stripe_mock do
12
+ after :create, &:create_stripe_mock!
13
+ end
4
14
  end
5
15
  end
@@ -4,5 +4,7 @@ FactoryBot.define do
4
4
  amount { Money.new(10_000, "USD") }
5
5
  amount_reversed { Money.new(0, "USD") }
6
6
  currency { "usd" }
7
+ livemode { false }
8
+ reversed { false }
7
9
  end
8
10
  end
@@ -12,6 +12,7 @@
12
12
  "id": "ch_00000000000000",
13
13
  "object": "charge",
14
14
  "amount": 100,
15
+ "amount_captured": 100,
15
16
  "amount_refunded": 100,
16
17
  "application": null,
17
18
  "application_fee": null,
@@ -17,7 +17,6 @@
17
17
  "application_fee_amount": null,
18
18
  "attempt_count": 1,
19
19
  "attempted": true,
20
- "auto_advance": false,
21
20
  "billing": "charge_automatically",
22
21
  "billing_reason": "subscription_create",
23
22
  "charge": "ch_00000000000000",
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": "cus_NiCY7UI5u0pbJH",
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.amount_capturable_updated"
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": null,
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.canceled"
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": null,
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.created"
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": null,
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.partially_funded"
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": null,
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.payment_failed"
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
3
+ "object": "event",
4
+ "api_version": "2022-11-15",
5
+ "created": 1681755758,
6
+ "data": {
7
+ "object": {
8
+ "id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
9
+ "object": "payment_intent",
10
+ "amount": 1000,
11
+ "amount_capturable": 0,
12
+ "amount_details": {
13
+ "tip": {}
14
+ },
15
+ "amount_received": 0,
16
+ "application": null,
17
+ "application_fee_amount": null,
18
+ "automatic_payment_methods": null,
19
+ "canceled_at": null,
20
+ "cancellation_reason": null,
21
+ "capture_method": "automatic",
22
+ "client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
23
+ "confirmation_method": "automatic",
24
+ "created": 1627149796,
25
+ "currency": "usd",
26
+ "customer": null,
27
+ "description": "Created by stripe.com/docs demo",
28
+ "invoice": null,
29
+ "last_payment_error": null,
30
+ "latest_charge": null,
31
+ "livemode": false,
32
+ "metadata": {},
33
+ "next_action": null,
34
+ "on_behalf_of": null,
35
+ "payment_method": null,
36
+ "payment_method_options": {
37
+ "card": {
38
+ "installments": null,
39
+ "mandate_options": null,
40
+ "network": null,
41
+ "request_three_d_secure": "automatic"
42
+ }
43
+ },
44
+ "payment_method_types": [
45
+ "card"
46
+ ],
47
+ "processing": null,
48
+ "receipt_email": null,
49
+ "review": null,
50
+ "setup_future_usage": null,
51
+ "shipping": null,
52
+ "statement_descriptor": null,
53
+ "statement_descriptor_suffix": null,
54
+ "status": "requires_payment_method",
55
+ "transfer_data": null,
56
+ "transfer_group": null
57
+ }
58
+ },
59
+ "livemode": true,
60
+ "pending_webhooks": 1,
61
+ "request": {
62
+ "id": null,
63
+ "idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
64
+ },
65
+ "type": "payment_intent.processing"
66
+ }