stripe_model_callbacks 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -1
- data/app/models/stripe_model_callbacks/application_record.rb +17 -0
- data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +1 -1
- data/app/services/stripe_model_callbacks/base_service.rb +35 -3
- data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/charge/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/configure_service.rb +52 -24
- data/app/services/stripe_model_callbacks/coupon/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/coupon/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice_item/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/notifier_service.rb +1 -1
- data/app/services/stripe_model_callbacks/order/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/payout/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/plan/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/price/updated_service.rb +14 -0
- data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/refund/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/source/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +2 -2
- data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +46 -0
- data/app/services/stripe_model_callbacks/sync_everything.rb +8 -0
- data/app/services/stripe_model_callbacks/sync_from_stripe.rb +29 -0
- data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +27 -0
- data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
- data/db/migrate/20200317160513_add_auto_advance_and_billing_reason_to_stripe_invoices.rb +6 -0
- data/db/migrate/20200317160602_add_status_and_status_transitions_to_stripe_invoices.rb +10 -0
- data/db/migrate/20200317180115_add_product_type_to_products.rb +5 -0
- data/db/migrate/20200317181224_rename_stripe_invoices_application_fee_to_application_fee_amount.rb +6 -0
- data/db/migrate/20200320105158_make_stripe_invoices_forgive_optional.rb +5 -0
- data/db/migrate/20200320114859_make_stripe_invoice_closed_optional.rb +5 -0
- data/db/migrate/20200323143634_add_amount_paid_and_remaining_and_invoice_url_and_pdf.rb +11 -0
- data/db/migrate/20200331074940_add_unit_label_to_stripe_products.rb +5 -0
- data/db/migrate/20200331075241_add_metered_info_to_stripe_plans.rb +9 -0
- data/db/migrate/20200513131105_create_stripe_subscription_schedules.rb +31 -0
- data/db/migrate/20200513131120_create_stripe_subscription_schedule_phases.rb +21 -0
- data/db/migrate/20200513131640_create_stripe_subscription_schedule_phase_plans.rb +13 -0
- data/db/migrate/20200514132247_add_stripe_id_uniq_to_stripe_invoices.rb +8 -0
- data/db/migrate/20200520152604_change_stripe_subscription_schedule_phase_id_to_bigint.rb +27 -0
- data/db/migrate/20200529144649_add_latest_invoice_id_to_stripe_subscription.rb +5 -0
- data/db/migrate/20201223173035_rename_stripe_subscriptions_start_to_start_date.rb +5 -0
- data/db/migrate/20201223202117_create_stripe_tax_rates.rb +15 -0
- data/db/migrate/20201224120534_create_stripe_subscription_default_tax_rates.rb +9 -0
- data/db/migrate/20201224122058_create_stripe_prices.rb +26 -0
- data/db/migrate/20201224123838_add_stripe_price_to_stripe_subscription_items.rb +6 -0
- data/db/migrate/20211121155313_change_invoice_billing_to_nullable.rb +5 -0
- data/db/migrate/20211121155732_rename_invoices_billing_to_deprecated_billing.rb +5 -0
- data/lib/stripe_model_callbacks/configuration.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_bank_accounts.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_cards.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_charges.rb +11 -0
- data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +21 -0
- data/lib/stripe_model_callbacks/factories/stripe_customers.rb +17 -0
- data/lib/stripe_model_callbacks/factories/stripe_discounts.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_disputes.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoice_items.rb +11 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +16 -0
- data/lib/stripe_model_callbacks/factories/stripe_order_items.rb +8 -0
- data/lib/stripe_model_callbacks/factories/stripe_orders.rb +9 -0
- data/lib/stripe_model_callbacks/factories/stripe_payouts.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_plans.rb +30 -0
- data/lib/stripe_model_callbacks/factories/stripe_prices.rb +3 -0
- data/lib/stripe_model_callbacks/factories/stripe_products.rb +18 -0
- data/lib/stripe_model_callbacks/factories/stripe_recipients.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_refunds.rb +9 -0
- data/lib/stripe_model_callbacks/factories/stripe_reviews.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_skus.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_sources.rb +8 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_default_tax_rates.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +19 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule.rb.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phase_plan.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phases.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +40 -0
- data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_transfers.rb +8 -0
- data/lib/stripe_model_callbacks/factory_bot_definitions.rb +1 -1
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.2020-12-24.json +112 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +84 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +135 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +207 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +105 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.voided.json +152 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +32 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.updated.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +49 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json +81 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json +77 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json +87 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.created.json +26 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.updated.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
- data/lib/stripe_model_callbacks/models/stripe_bank_account.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_card.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_charge.rb +3 -0
- data/lib/stripe_model_callbacks/models/stripe_coupon.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_customer.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_discount.rb +10 -3
- data/lib/stripe_model_callbacks/models/stripe_dispute.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_invoice.rb +62 -7
- data/lib/stripe_model_callbacks/models/stripe_invoice_item.rb +2 -0
- data/lib/stripe_model_callbacks/models/stripe_order.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_order_item.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_payout.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_plan.rb +4 -1
- data/lib/stripe_model_callbacks/models/stripe_price.rb +27 -0
- data/lib/stripe_model_callbacks/models/stripe_product.rb +17 -7
- data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_refund.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_review.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_sku.rb +13 -6
- data/lib/stripe_model_callbacks/models/stripe_source.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_subscription.rb +56 -6
- data/lib/stripe_model_callbacks/models/stripe_subscription_default_tax_rate.rb +4 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +19 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +94 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +67 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase_plan.rb +37 -0
- data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +22 -0
- data/lib/stripe_model_callbacks/models/stripe_transfer.rb +1 -0
- data/lib/stripe_model_callbacks/version.rb +1 -1
- data/lib/stripe_model_callbacks.rb +1 -0
- metadata +163 -11
@@ -0,0 +1,135 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "invoice.created",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-02-05",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "in_00000000000000",
|
13
|
+
"object": "invoice",
|
14
|
+
"account_country": "DK",
|
15
|
+
"account_name": "KNJ IT-solutions",
|
16
|
+
"account_tax_ids": null,
|
17
|
+
"amount_due": 3500,
|
18
|
+
"amount_paid": 3500,
|
19
|
+
"amount_remaining": 0,
|
20
|
+
"application_fee_amount": null,
|
21
|
+
"attempt_count": 1,
|
22
|
+
"attempted": false,
|
23
|
+
"auto_advance": false,
|
24
|
+
"automatic_tax": {
|
25
|
+
"enabled": false,
|
26
|
+
"status": null
|
27
|
+
},
|
28
|
+
"billing_reason": "subscription_create",
|
29
|
+
"charge": "ch_00000000000000",
|
30
|
+
"collection_method": "charge_automatically",
|
31
|
+
"created": 1637488924,
|
32
|
+
"currency": "dkk",
|
33
|
+
"customer": "cus_00000000000000",
|
34
|
+
"customer_address": null,
|
35
|
+
"customer_email": "customer@example.com",
|
36
|
+
"customer_name": null,
|
37
|
+
"customer_phone": null,
|
38
|
+
"customer_shipping": null,
|
39
|
+
"customer_tax_exempt": "none",
|
40
|
+
"customer_tax_ids": [],
|
41
|
+
"default_payment_method": null,
|
42
|
+
"default_source": null,
|
43
|
+
"default_tax_rates": [
|
44
|
+
{
|
45
|
+
"id": "txr_1CLElKJHvNqCXRbQESFuQiCC",
|
46
|
+
"object": "tax_rate",
|
47
|
+
"active": true,
|
48
|
+
"country": null,
|
49
|
+
"created": 1524767050,
|
50
|
+
"description": null,
|
51
|
+
"display_name": "Tax",
|
52
|
+
"inclusive": false,
|
53
|
+
"jurisdiction": null,
|
54
|
+
"livemode": true,
|
55
|
+
"metadata": {
|
56
|
+
},
|
57
|
+
"percentage": 25,
|
58
|
+
"state": null,
|
59
|
+
"tax_type": null
|
60
|
+
}
|
61
|
+
],
|
62
|
+
"date": 1517763745,
|
63
|
+
"description": null,
|
64
|
+
"discount": null,
|
65
|
+
"due_date": null,
|
66
|
+
"ending_balance": 0,
|
67
|
+
"lines": {
|
68
|
+
"data": [
|
69
|
+
{
|
70
|
+
"id": "sub_CHS7NOE0WD1Jro",
|
71
|
+
"object": "line_item",
|
72
|
+
"amount": 6000,
|
73
|
+
"currency": "dkk",
|
74
|
+
"description": "1x Manage translations for your apps (at 60.00 kr)",
|
75
|
+
"discountable": true,
|
76
|
+
"livemode": true,
|
77
|
+
"metadata": {
|
78
|
+
},
|
79
|
+
"period": {
|
80
|
+
"start": 1520430249,
|
81
|
+
"end": 1523108649
|
82
|
+
},
|
83
|
+
"plan": {
|
84
|
+
"id": "peak_flow_build",
|
85
|
+
"object": "plan",
|
86
|
+
"amount": 6000,
|
87
|
+
"created": 1517990173,
|
88
|
+
"currency": "dkk",
|
89
|
+
"interval": "month",
|
90
|
+
"interval_count": 1,
|
91
|
+
"livemode": false,
|
92
|
+
"metadata": {
|
93
|
+
},
|
94
|
+
"nickname": null,
|
95
|
+
"product": "prod_CHMVwyJFgchZEk",
|
96
|
+
"trial_period_days": null
|
97
|
+
},
|
98
|
+
"proration": false,
|
99
|
+
"quantity": 1,
|
100
|
+
"subscription": null,
|
101
|
+
"subscription_item": "si_CHS7VAL80FwJv7",
|
102
|
+
"type": "subscription"
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"has_more": false,
|
106
|
+
"object": "list",
|
107
|
+
"url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
|
108
|
+
},
|
109
|
+
"livemode": false,
|
110
|
+
"metadata": {
|
111
|
+
},
|
112
|
+
"next_payment_attempt": null,
|
113
|
+
"number": "a04598880b-0007",
|
114
|
+
"paid": true,
|
115
|
+
"period_end": 1517763745,
|
116
|
+
"period_start": 1517763745,
|
117
|
+
"receipt_number": null,
|
118
|
+
"starting_balance": 0,
|
119
|
+
"statement_descriptor": null,
|
120
|
+
"status": "draft",
|
121
|
+
"status_transitions": {
|
122
|
+
"finalized_at": null,
|
123
|
+
"marked_uncollectible_at": null,
|
124
|
+
"paid_at": null,
|
125
|
+
"voided_at": null
|
126
|
+
},
|
127
|
+
"subscription": "sub_00000000000000",
|
128
|
+
"subtotal": 3500,
|
129
|
+
"tax": null,
|
130
|
+
"tax_percent": null,
|
131
|
+
"total": 3500,
|
132
|
+
"webhooks_delivered_at": 1517763754
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "invoice.payment_failed",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "in_00000000000000",
|
13
|
+
"object": "invoice",
|
14
|
+
"amount_due": 3500,
|
15
|
+
"amount_paid": 0,
|
16
|
+
"amount_remaining": 3500,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"attempt_count": 0,
|
19
|
+
"attempted": true,
|
20
|
+
"auto_advance": true,
|
21
|
+
"billing": "charge_automatically",
|
22
|
+
"billing_reason": "subscription_create",
|
23
|
+
"charge": null,
|
24
|
+
"collection_method": "charge_automatically",
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": "cus_00000000000000",
|
27
|
+
"date": 1517847362,
|
28
|
+
"description": null,
|
29
|
+
"discount": null,
|
30
|
+
"due_date": null,
|
31
|
+
"ending_balance": null,
|
32
|
+
"lines": {
|
33
|
+
"data": [
|
34
|
+
{
|
35
|
+
"id": "sub_CGk7QTdZmtlscW",
|
36
|
+
"object": "line_item",
|
37
|
+
"amount": 999,
|
38
|
+
"currency": "usd",
|
39
|
+
"description": "1x Silver Express (at $9.99)",
|
40
|
+
"discountable": true,
|
41
|
+
"livemode": true,
|
42
|
+
"metadata": {
|
43
|
+
},
|
44
|
+
"period": {
|
45
|
+
"start": 1517847363,
|
46
|
+
"end": 1520266563
|
47
|
+
},
|
48
|
+
"plan": {
|
49
|
+
"id": "gold",
|
50
|
+
"object": "plan",
|
51
|
+
"amount": 2000,
|
52
|
+
"created": 1517847363,
|
53
|
+
"currency": "usd",
|
54
|
+
"interval": "month",
|
55
|
+
"interval_count": 1,
|
56
|
+
"livemode": false,
|
57
|
+
"metadata": {
|
58
|
+
},
|
59
|
+
"name": "Extra Large",
|
60
|
+
"statement_descriptor": null,
|
61
|
+
"trial_period_days": null
|
62
|
+
},
|
63
|
+
"proration": false,
|
64
|
+
"quantity": 1,
|
65
|
+
"subscription": null,
|
66
|
+
"subscription_item": "si_CGk7XyC1ml0Jz7",
|
67
|
+
"type": "subscription"
|
68
|
+
}
|
69
|
+
],
|
70
|
+
"has_more": false,
|
71
|
+
"object": "list",
|
72
|
+
"url": "/v1/invoices/in_1BsCdTAT5SYrvIfdU0puHC0J/lines"
|
73
|
+
},
|
74
|
+
"livemode": false,
|
75
|
+
"metadata": {
|
76
|
+
},
|
77
|
+
"next_payment_attempt": 1517850962,
|
78
|
+
"number": "5a331c0634-0001",
|
79
|
+
"paid": false,
|
80
|
+
"period_end": 1517847362,
|
81
|
+
"period_start": 1517847362,
|
82
|
+
"receipt_number": null,
|
83
|
+
"starting_balance": 0,
|
84
|
+
"statement_descriptor": null,
|
85
|
+
"status": "uncollectible",
|
86
|
+
"status_transitions": {
|
87
|
+
"finalized_at": 1561806335,
|
88
|
+
"marked_uncollectible_at": null,
|
89
|
+
"paid_at": null,
|
90
|
+
"voided_at": null
|
91
|
+
},
|
92
|
+
"subscription": null,
|
93
|
+
"subtotal": 0,
|
94
|
+
"tax": null,
|
95
|
+
"tax_percent": null,
|
96
|
+
"total": 0,
|
97
|
+
"webhooks_delivered_at": null
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
@@ -0,0 +1,207 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1BrsEiAT5SYrvIfdKoCZtqiY",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2018-01-23",
|
5
|
+
"created": 1517768948,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "in_1BrsEhAT5SYrvIfdlmd9sZns",
|
9
|
+
"object": "invoice",
|
10
|
+
"amount_due": 10000,
|
11
|
+
"amount_paid": 10000,
|
12
|
+
"amount_remaining": 0,
|
13
|
+
"application_fee_amount": null,
|
14
|
+
"attempt_count": 0,
|
15
|
+
"attempted": true,
|
16
|
+
"auto_advance": false,
|
17
|
+
"billing": "charge_automatically",
|
18
|
+
"billing_reason": "subscription_create",
|
19
|
+
"charge": "ch_1BrsEhAT5SYrvIfdDOd8ifsb",
|
20
|
+
"collection_method": "charge_automatically",
|
21
|
+
"currency": "dkk",
|
22
|
+
"customer": "cus_CGNFgjPGtHlvXI",
|
23
|
+
"date": 1517768947,
|
24
|
+
"description": null,
|
25
|
+
"discount": null,
|
26
|
+
"due_date": null,
|
27
|
+
"ending_balance": 0,
|
28
|
+
"hosted_invoice_url": "https://pay.stripe.com/invoice/XX/invst_YY",
|
29
|
+
"invoice_pdf": "https://pay.stripe.com/invoice/XX/invst_YY/pdf",
|
30
|
+
"lines": {
|
31
|
+
"object": "list",
|
32
|
+
"data": [
|
33
|
+
{
|
34
|
+
"id": "sub_CGP2EtRzfVystw",
|
35
|
+
"object": "line_item",
|
36
|
+
"amount": 10000,
|
37
|
+
"currency": "dkk",
|
38
|
+
"description": "1x Medium (at 100.00 kr)",
|
39
|
+
"discountable": true,
|
40
|
+
"livemode": false,
|
41
|
+
"metadata": {
|
42
|
+
},
|
43
|
+
"period": {
|
44
|
+
"start": 1517768947,
|
45
|
+
"end": 1520188147
|
46
|
+
},
|
47
|
+
"plan": {
|
48
|
+
"id": "medium",
|
49
|
+
"object": "plan",
|
50
|
+
"amount": 10000,
|
51
|
+
"created": 1517762877,
|
52
|
+
"currency": "dkk",
|
53
|
+
"interval": "month",
|
54
|
+
"interval_count": 1,
|
55
|
+
"livemode": false,
|
56
|
+
"metadata": {
|
57
|
+
},
|
58
|
+
"name": "Medium",
|
59
|
+
"statement_descriptor": null,
|
60
|
+
"trial_period_days": null
|
61
|
+
},
|
62
|
+
"proration": false,
|
63
|
+
"quantity": 1,
|
64
|
+
"subscription": null,
|
65
|
+
"subscription_item": "si_CGP2ToZxkcfmed",
|
66
|
+
"type": "subscription"
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"has_more": false,
|
70
|
+
"total_count": 1,
|
71
|
+
"url": "/v1/invoices/in_1BrsEhAT5SYrvIfdlmd9sZns/lines"
|
72
|
+
},
|
73
|
+
"livemode": false,
|
74
|
+
"metadata": {
|
75
|
+
},
|
76
|
+
"next_payment_attempt": null,
|
77
|
+
"number": "a04598880b-0014",
|
78
|
+
"paid": true,
|
79
|
+
"period_end": 1517768947,
|
80
|
+
"period_start": 1517768947,
|
81
|
+
"receipt_number": null,
|
82
|
+
"starting_balance": 0,
|
83
|
+
"statement_descriptor": null,
|
84
|
+
"status": "draft",
|
85
|
+
"status_transitions": {
|
86
|
+
"finalized_at": 1561806335,
|
87
|
+
"marked_uncollectible_at": null,
|
88
|
+
"paid_at": 1561806337,
|
89
|
+
"voided_at": null
|
90
|
+
},
|
91
|
+
"subscription": "sub_CGP2EtRzfVystw",
|
92
|
+
"subtotal": 10000,
|
93
|
+
"tax": null,
|
94
|
+
"tax_percent": null,
|
95
|
+
"total": 10000,
|
96
|
+
"webhooks_delivered_at": null
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"livemode": false,
|
100
|
+
"pending_webhooks": 1,
|
101
|
+
"request": {
|
102
|
+
"id": "req_da68RQKwcXNaZ7",
|
103
|
+
"idempotency_key": null
|
104
|
+
},
|
105
|
+
"type": "invoice.payment_succeeded",
|
106
|
+
"webhook": {
|
107
|
+
"id": "evt_1BrsEiAT5SYrvIfdKoCZtqiY",
|
108
|
+
"object": "event",
|
109
|
+
"api_version": "2018-01-23",
|
110
|
+
"created": 1517768948,
|
111
|
+
"data": {
|
112
|
+
"object": {
|
113
|
+
"id": "in_1BrsEhAT5SYrvIfdlmd9sZns",
|
114
|
+
"object": "invoice",
|
115
|
+
"amount_due": 10000,
|
116
|
+
"application_fee_amount": null,
|
117
|
+
"attempt_count": 0,
|
118
|
+
"attempted": true,
|
119
|
+
"billing": "charge_automatically",
|
120
|
+
"charge": "ch_1BrsEhAT5SYrvIfdDOd8ifsb",
|
121
|
+
"closed": true,
|
122
|
+
"currency": "dkk",
|
123
|
+
"customer": "cus_CGNFgjPGtHlvXI",
|
124
|
+
"date": 1517768947,
|
125
|
+
"description": null,
|
126
|
+
"discount": null,
|
127
|
+
"due_date": null,
|
128
|
+
"ending_balance": 0,
|
129
|
+
"forgiven": false,
|
130
|
+
"lines": {
|
131
|
+
"object": "list",
|
132
|
+
"data": [
|
133
|
+
{
|
134
|
+
"id": "sub_CGP2EtRzfVystw",
|
135
|
+
"object": "line_item",
|
136
|
+
"amount": 10000,
|
137
|
+
"currency": "dkk",
|
138
|
+
"description": "1x Medium (at 100.00 kr)",
|
139
|
+
"discountable": true,
|
140
|
+
"livemode": false,
|
141
|
+
"metadata": {
|
142
|
+
},
|
143
|
+
"period": {
|
144
|
+
"start": 1517768947,
|
145
|
+
"end": 1520188147
|
146
|
+
},
|
147
|
+
"plan": {
|
148
|
+
"id": "medium",
|
149
|
+
"object": "plan",
|
150
|
+
"amount": 10000,
|
151
|
+
"created": 1517762877,
|
152
|
+
"currency": "dkk",
|
153
|
+
"interval": "month",
|
154
|
+
"interval_count": 1,
|
155
|
+
"livemode": false,
|
156
|
+
"metadata": {
|
157
|
+
},
|
158
|
+
"name": "Medium",
|
159
|
+
"statement_descriptor": null,
|
160
|
+
"trial_period_days": null
|
161
|
+
},
|
162
|
+
"proration": false,
|
163
|
+
"quantity": 1,
|
164
|
+
"subscription": null,
|
165
|
+
"subscription_item": "si_CGP2ToZxkcfmed",
|
166
|
+
"type": "subscription"
|
167
|
+
}
|
168
|
+
],
|
169
|
+
"has_more": false,
|
170
|
+
"total_count": 1,
|
171
|
+
"url": "/v1/invoices/in_1BrsEhAT5SYrvIfdlmd9sZns/lines"
|
172
|
+
},
|
173
|
+
"livemode": false,
|
174
|
+
"metadata": {
|
175
|
+
},
|
176
|
+
"next_payment_attempt": null,
|
177
|
+
"number": "a04598880b-0014",
|
178
|
+
"paid": true,
|
179
|
+
"period_end": 1517768947,
|
180
|
+
"period_start": 1517768947,
|
181
|
+
"receipt_number": null,
|
182
|
+
"starting_balance": 0,
|
183
|
+
"statement_descriptor": null,
|
184
|
+
"status": "draft",
|
185
|
+
"status_transitions": {
|
186
|
+
"finalized_at": 1561806335,
|
187
|
+
"marked_uncollectible_at": null,
|
188
|
+
"paid_at": 1561806337,
|
189
|
+
"voided_at": null
|
190
|
+
},
|
191
|
+
"subscription": "sub_CGP2EtRzfVystw",
|
192
|
+
"subtotal": 10000,
|
193
|
+
"tax": null,
|
194
|
+
"tax_percent": null,
|
195
|
+
"total": 10000,
|
196
|
+
"webhooks_delivered_at": null
|
197
|
+
}
|
198
|
+
},
|
199
|
+
"livemode": false,
|
200
|
+
"pending_webhooks": 1,
|
201
|
+
"request": {
|
202
|
+
"id": "req_da68RQKwcXNaZ7",
|
203
|
+
"idempotency_key": null
|
204
|
+
},
|
205
|
+
"type": "invoice.payment_succeeded"
|
206
|
+
}
|
207
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "invoice.sent",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-02-05",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "in_00000000000000",
|
13
|
+
"object": "invoice",
|
14
|
+
"amount_due": 3500,
|
15
|
+
"amount_paid": 3500,
|
16
|
+
"amount_remaining": 0,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"attempt_count": 1,
|
19
|
+
"attempted": true,
|
20
|
+
"auto_advance": false,
|
21
|
+
"billing": "charge_automatically",
|
22
|
+
"billing_reason": "subscription_create",
|
23
|
+
"charge": "ch_00000000000000",
|
24
|
+
"collection_method": "charge_automatically",
|
25
|
+
"currency": "dkk",
|
26
|
+
"customer": "cus_00000000000000",
|
27
|
+
"date": 1517763745,
|
28
|
+
"description": null,
|
29
|
+
"discount": null,
|
30
|
+
"due_date": null,
|
31
|
+
"ending_balance": 0,
|
32
|
+
"lines": {
|
33
|
+
"data": [
|
34
|
+
{
|
35
|
+
"id": "sub_CHS7NOE0WD1Jro",
|
36
|
+
"object": "line_item",
|
37
|
+
"amount": 6000,
|
38
|
+
"currency": "dkk",
|
39
|
+
"description": "1x Manage translations for your apps (at 60.00 kr)",
|
40
|
+
"discountable": true,
|
41
|
+
"livemode": true,
|
42
|
+
"metadata": {
|
43
|
+
},
|
44
|
+
"period": {
|
45
|
+
"start": 1520430249,
|
46
|
+
"end": 1523108649
|
47
|
+
},
|
48
|
+
"plan": {
|
49
|
+
"id": "peak_flow_build",
|
50
|
+
"object": "plan",
|
51
|
+
"amount": 6000,
|
52
|
+
"created": 1517990173,
|
53
|
+
"currency": "dkk",
|
54
|
+
"interval": "month",
|
55
|
+
"interval_count": 1,
|
56
|
+
"livemode": false,
|
57
|
+
"metadata": {
|
58
|
+
},
|
59
|
+
"nickname": null,
|
60
|
+
"product": "prod_CHMVwyJFgchZEk",
|
61
|
+
"trial_period_days": null
|
62
|
+
},
|
63
|
+
"proration": false,
|
64
|
+
"quantity": 1,
|
65
|
+
"subscription": null,
|
66
|
+
"subscription_item": "si_CHS7VAL80FwJv7",
|
67
|
+
"type": "subscription"
|
68
|
+
}
|
69
|
+
],
|
70
|
+
"has_more": false,
|
71
|
+
"object": "list",
|
72
|
+
"url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
|
73
|
+
},
|
74
|
+
"livemode": false,
|
75
|
+
"metadata": {
|
76
|
+
},
|
77
|
+
"next_payment_attempt": null,
|
78
|
+
"number": "a04598880b-0007",
|
79
|
+
"paid": true,
|
80
|
+
"period_end": 1517763745,
|
81
|
+
"period_start": 1517763745,
|
82
|
+
"receipt_number": null,
|
83
|
+
"starting_balance": 0,
|
84
|
+
"statement_descriptor": null,
|
85
|
+
"status": "draft",
|
86
|
+
"status_transitions": {
|
87
|
+
"finalized_at": 1561806335,
|
88
|
+
"marked_uncollectible_at": null,
|
89
|
+
"paid_at": null,
|
90
|
+
"voided_at": null
|
91
|
+
},
|
92
|
+
"subscription": "sub_00000000000000",
|
93
|
+
"subtotal": 3500,
|
94
|
+
"tax": null,
|
95
|
+
"tax_percent": null,
|
96
|
+
"total": 3500,
|
97
|
+
"webhooks_delivered_at": 1517763754
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "invoice.upcoming",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-02-05",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": null,
|
13
|
+
"object": "invoice",
|
14
|
+
"amount_due": 3500,
|
15
|
+
"amount_paid": 0,
|
16
|
+
"amount_remaining": 3500,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"attempt_count": 1,
|
19
|
+
"attempted": true,
|
20
|
+
"auto_advance": false,
|
21
|
+
"billing": "charge_automatically",
|
22
|
+
"billing_reason": "subscription_create",
|
23
|
+
"charge": "ch_00000000000000",
|
24
|
+
"collection_method": "charge_automatically",
|
25
|
+
"currency": "dkk",
|
26
|
+
"customer": "cus_00000000000000",
|
27
|
+
"date": 1517763745,
|
28
|
+
"description": null,
|
29
|
+
"discount": null,
|
30
|
+
"due_date": null,
|
31
|
+
"ending_balance": 0,
|
32
|
+
"lines": {
|
33
|
+
"data": [
|
34
|
+
{
|
35
|
+
"id": "sub_CHS7NOE0WD1Jro",
|
36
|
+
"object": "line_item",
|
37
|
+
"amount": 6000,
|
38
|
+
"currency": "dkk",
|
39
|
+
"description": "1x Manage translations for your apps (at 60.00 kr)",
|
40
|
+
"discountable": true,
|
41
|
+
"livemode": true,
|
42
|
+
"metadata": {
|
43
|
+
},
|
44
|
+
"period": {
|
45
|
+
"start": 1520430249,
|
46
|
+
"end": 1523108649
|
47
|
+
},
|
48
|
+
"plan": {
|
49
|
+
"id": "peak_flow_build",
|
50
|
+
"object": "plan",
|
51
|
+
"amount": 6000,
|
52
|
+
"created": 1517990173,
|
53
|
+
"currency": "dkk",
|
54
|
+
"interval": "month",
|
55
|
+
"interval_count": 1,
|
56
|
+
"livemode": false,
|
57
|
+
"metadata": {
|
58
|
+
},
|
59
|
+
"nickname": null,
|
60
|
+
"product": "prod_CHMVwyJFgchZEk",
|
61
|
+
"trial_period_days": null
|
62
|
+
},
|
63
|
+
"proration": false,
|
64
|
+
"quantity": 1,
|
65
|
+
"subscription": null,
|
66
|
+
"subscription_item": "si_CHS7VAL80FwJv7",
|
67
|
+
"type": "subscription"
|
68
|
+
}
|
69
|
+
],
|
70
|
+
"has_more": false,
|
71
|
+
"object": "list",
|
72
|
+
"url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
|
73
|
+
},
|
74
|
+
"livemode": false,
|
75
|
+
"metadata": {
|
76
|
+
},
|
77
|
+
"next_payment_attempt": null,
|
78
|
+
"number": "a04598880b-0007",
|
79
|
+
"paid": true,
|
80
|
+
"period_end": 1517763745,
|
81
|
+
"period_start": 1517763745,
|
82
|
+
"receipt_number": null,
|
83
|
+
"starting_balance": 0,
|
84
|
+
"statement_descriptor": null,
|
85
|
+
"status": "draft",
|
86
|
+
"status_transitions": {
|
87
|
+
"finalized_at": 1561806335,
|
88
|
+
"marked_uncollectible_at": null,
|
89
|
+
"paid_at": null,
|
90
|
+
"voided_at": null
|
91
|
+
},
|
92
|
+
"subscription": "sub_00000000000000",
|
93
|
+
"subtotal": 3500,
|
94
|
+
"tax": null,
|
95
|
+
"tax_percent": null,
|
96
|
+
"total": 3500,
|
97
|
+
"webhooks_delivered_at": 1517763754
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|