Coverage for src/tests/test_donations.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import json
2from unittest.mock import patch
4import pytest
6import couchers.servicers.donations
7from couchers.config import config
8from couchers.db import session_scope
9from couchers.models import Invoice, OneTimeDonation, RecurringDonation
10from couchers.sql import couchers_select as select
11from proto import donations_pb2
12from proto.google.api import httpbody_pb2
13from tests.test_fixtures import db, donations_session, generate_user, real_stripe_session, testconfig # noqa
16@pytest.fixture(autouse=True)
17def _(testconfig):
18 pass
21def test_one_off_donation_flow(db, monkeypatch):
22 user, token = generate_user()
23 user_email = user.email
24 user_id = user.id
26 new_config = config.copy()
27 new_config["ENABLE_DONATIONS"] = True
28 new_config["STRIPE_API_KEY"] = "dummy_api_key"
29 new_config["STRIPE_WEBHOOK_SECRET"] = "dummy_webhook_secret"
30 new_config["STRIPE_RECURRING_PRODUCT_ID"] = "price_1IRoHdE5kUmYuPWz9tX8UpRv"
32 monkeypatch.setattr(couchers.servicers.donations, "config", new_config)
34 ## User first makes a req to Donations.InitiateDonation
35 with donations_session(token) as donations:
36 with patch("couchers.servicers.donations.stripe") as mock:
37 mock.Customer.create.return_value = type("__MockCustomer", (), {"id": "cus_JoeqxRiXxWnThy"})
38 mock.checkout.Session.create.return_value = type(
39 "__MockCheckoutSession",
40 (),
41 {
42 "id": "cs_test_a1ScieS4Qtnak4fI7qhUChYz0XBBzwRBKMjNESus7eiF0WvIcV07i3TFx5",
43 "payment_intent": "pi_1JB4HaE5kUmYuPWz9O9m5vd9",
44 },
45 )
47 res = donations.InitiateDonation(
48 donations_pb2.InitiateDonationReq(
49 amount=100,
50 recurring=False,
51 )
52 )
54 mock.Customer.create.assert_called_once_with(
55 email=user_email, metadata={"user_id": user_id}, api_key="dummy_api_key"
56 )
58 mock.checkout.Session.create.assert_called_once_with(
59 client_reference_id=user_id,
60 submit_type="donate",
61 customer="cus_JoeqxRiXxWnThy",
62 success_url="http://localhost:3000/donate?success=true",
63 cancel_url="http://localhost:3000/donate?cancelled=true",
64 payment_method_types=["card"],
65 mode="payment",
66 line_items=[
67 {
68 "price_data": {
69 "currency": "usd",
70 "unit_amount": 10000,
71 "product_data": {
72 "name": f"Couchers financial supporter (one-time)",
73 "images": ["https://couchers.org/img/share.jpg"],
74 },
75 },
76 "quantity": 1,
77 }
78 ],
79 api_key="dummy_api_key",
80 )
82 ## Stripe then makes some webhooks requests
84 # evt_1JB4HbE5kUmYuPWzIhui6KMm: payment_intent.created
85 fire_stripe_event("evt_1JB4HbE5kUmYuPWzIhui6KMm")
87 # evt_1JB4HyE5kUmYuPWzOgFnJ83g: payment_intent.succeeded
88 fire_stripe_event("evt_1JB4HyE5kUmYuPWzOgFnJ83g")
90 # evt_1JB4HyE5kUmYuPWzATTZL7Mt: charge.succeeded
91 fire_stripe_event("evt_1JB4HyE5kUmYuPWzATTZL7Mt")
93 # evt_1JB4HyE5kUmYuPWzINvGWlRu: checkout.session.completed
94 fire_stripe_event("evt_1JB4HyE5kUmYuPWzINvGWlRu")
96 ## Now finally check everything was added to the DB
97 with session_scope() as session:
98 donation = session.execute(select(OneTimeDonation)).scalar_one()
99 assert donation.user_id == user_id
100 assert donation.amount == 100
101 assert (
102 donation.stripe_checkout_session_id == "cs_test_a1ScieS4Qtnak4fI7qhUChYz0XBBzwRBKMjNESus7eiF0WvIcV07i3TFx5"
103 )
104 assert donation.stripe_payment_intent_id == "pi_1JB4HaE5kUmYuPWz9O9m5vd9"
105 assert donation.paid
107 invoice = session.execute(select(Invoice)).scalar_one()
108 assert invoice.user_id == user_id
109 assert invoice.amount == 100
110 assert invoice.stripe_payment_intent_id == "pi_1JB4HaE5kUmYuPWz9O9m5vd9"
111 assert (
112 invoice.stripe_receipt_url
113 == "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4HxE5kUmYuPWzz7oeBRTi/rcpt_JohhbAbYmnsICXvVleNLWd4bLy6HRn3"
114 )
117def test_recurring_donation_flow(db, monkeypatch):
118 user, token = generate_user()
119 user_email = user.email
120 user_id = user.id
122 new_config = config.copy()
123 new_config["ENABLE_DONATIONS"] = True
124 new_config["STRIPE_API_KEY"] = "dummy_api_key"
125 new_config["STRIPE_WEBHOOK_SECRET"] = "dummy_webhook_secret"
126 new_config["STRIPE_RECURRING_PRODUCT_ID"] = "price_1IRoHdE5kUmYuPWz9tX8UpRv"
128 monkeypatch.setattr(couchers.servicers.donations, "config", new_config)
130 ## User first makes a req to Donations.InitiateDonation
131 with donations_session(token) as donations:
132 with patch("couchers.servicers.donations.stripe") as mock:
133 mock.Customer.create.return_value = type("__MockCustomer", (), {"id": "cus_JoeqxRiXxWnThy"})
134 mock.checkout.Session.create.return_value = type(
135 "__MockCheckoutSession",
136 (),
137 {
138 "id": "cs_test_a1xQjLyaMWpDj2Quqc5JBFnVQXHcVuS5bu53Nr8Kz6xDTuXERmqNzz3dUi",
139 },
140 )
142 res = donations.InitiateDonation(
143 donations_pb2.InitiateDonationReq(
144 amount=25,
145 recurring=True,
146 )
147 )
149 mock.Customer.create.assert_called_once_with(
150 email=user_email, metadata={"user_id": user_id}, api_key="dummy_api_key"
151 )
153 mock.checkout.Session.create.assert_called_once_with(
154 client_reference_id=user_id,
155 customer="cus_JoeqxRiXxWnThy",
156 submit_type=None,
157 success_url="http://localhost:3000/donate?success=true",
158 cancel_url="http://localhost:3000/donate?cancelled=true",
159 payment_method_types=["card"],
160 mode="subscription",
161 line_items=[
162 {
163 "price": "price_1IRoHdE5kUmYuPWz9tX8UpRv",
164 "quantity": 25,
165 }
166 ],
167 api_key="dummy_api_key",
168 )
170 ## Stripe then makes some webhooks requests
172 # evt_1JB4JzE5kUmYuPWzcUfHrmpg: charge.succeeded
173 fire_stripe_event("evt_1JB4JzE5kUmYuPWzcUfHrmpg")
175 # evt_1JB4JzE5kUmYuPWzDA6Qyjpb: checkout.session.completed
176 fire_stripe_event("evt_1JB4JzE5kUmYuPWzDA6Qyjpb")
178 # evt_1JB4JzE5kUmYuPWzjn9vamRp: invoice.created
179 fire_stripe_event("evt_1JB4JzE5kUmYuPWzjn9vamRp")
181 # evt_1JB4JzE5kUmYuPWzRcyujatc: customer.subscription.created
182 fire_stripe_event("evt_1JB4JzE5kUmYuPWzRcyujatc")
184 # evt_1JB4K0E5kUmYuPWzqEdiFwUD: invoice.finalized
185 fire_stripe_event("evt_1JB4K0E5kUmYuPWzqEdiFwUD")
187 # evt_1JB4K0E5kUmYuPWzDbrDO7MI: invoice.updated
188 fire_stripe_event("evt_1JB4K0E5kUmYuPWzDbrDO7MI")
190 # evt_1JB4K0E5kUmYuPWzHesDmivt: invoice.updated
191 fire_stripe_event("evt_1JB4K0E5kUmYuPWzHesDmivt")
193 # evt_1JB4K0E5kUmYuPWzszfh6fcC: payment_intent.succeeded
194 fire_stripe_event("evt_1JB4K0E5kUmYuPWzszfh6fcC")
196 # evt_1JB4K0E5kUmYuPWzTCyFgyhF: payment_intent.created
197 fire_stripe_event("evt_1JB4K0E5kUmYuPWzTCyFgyhF")
199 # evt_1JB4K0E5kUmYuPWzh6QF2Md4: customer.subscription.updated
200 fire_stripe_event("evt_1JB4K0E5kUmYuPWzh6QF2Md4")
202 # evt_1JB4K0E5kUmYuPWzSj00EC0m: invoice.paid
203 fire_stripe_event("evt_1JB4K0E5kUmYuPWzSj00EC0m")
205 # evt_1JB4K0E5kUmYuPWzGQN86BFq: invoice.payment_succeeded
206 fire_stripe_event("evt_1JB4K0E5kUmYuPWzGQN86BFq")
208 ## Now finally check everything was added to the DB
209 with session_scope() as session:
210 donation = session.execute(select(RecurringDonation)).scalar_one()
211 assert donation.user_id == user_id
212 assert donation.amount == 25
213 assert (
214 donation.stripe_checkout_session_id == "cs_test_a1xQjLyaMWpDj2Quqc5JBFnVQXHcVuS5bu53Nr8Kz6xDTuXERmqNzz3dUi"
215 )
216 assert donation.stripe_subscription_id == "sub_Johj2mPZu6V3CG"
218 invoice = session.execute(select(Invoice)).scalar_one()
219 assert invoice.user_id == user_id
220 assert invoice.amount == 25
221 assert invoice.stripe_payment_intent_id == "pi_1JB4JxE5kUmYuPWzX0clpUMw"
222 assert (
223 invoice.stripe_receipt_url
224 == "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4JyE5kUmYuPWzQE89dS26/rcpt_JohjDboc1K4PvOpYwBVD7iaxTggr8xt"
225 )
228def fire_stripe_event(event_id):
229 event = json.loads(STRIPE_WEBHOOK_EVENTS[event_id])
230 with real_stripe_session() as api:
231 with patch("couchers.servicers.donations.stripe") as mock:
232 mock.Webhook.construct_event.return_value = event
233 reply = api.Webhook(
234 httpbody_pb2.HttpBody(content_type="application/json", data=b"{}"),
235 metadata=(("stripe-signature", "dummy_sig"),),
236 )
237 mock.Webhook.construct_event.assert_called_once_with(
238 payload=b"{}", sig_header="dummy_sig", secret="dummy_webhook_secret", api_key="dummy_api_key"
239 )
242STRIPE_WEBHOOK_EVENTS = {
243 "evt_1JB4HbE5kUmYuPWzIhui6KMm": '{"id": "evt_1JB4HbE5kUmYuPWzIhui6KMm", "object": "event", "api_version": "2020-08-27", "created": 1625777839, "data": {"object": {"id": "pi_1JB4HaE5kUmYuPWz9O9m5vd9", "object": "payment_intent", "amount": 10000, "amount_capturable": 0, "amount_received": 0, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges?payment_intent=pi_1JB4HaE5kUmYuPWz9O9m5vd9"}, "client_secret": "pi_1JB4HaE5kUmYuPWz9O9m5vd9_secret_HRoOPtRXhXx9SC5BO26Laz9Nu", "confirmation_method": "automatic", "created": 1625777838, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": null, "invoice": null, "last_payment_error": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": {"card": {"installments": null, "network": null, "request_three_d_secure": "automatic"}}, "payment_method_types": ["card"], "receipt_email": "aapeli@couchers.org", "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_7fEDnLd6uiGrrZ", "idempotency_key": "b4ca6ea2-df32-4cec-aa55-1969bc2bbcec"}, "type": "payment_intent.created"}',
244 "evt_1JB4HyE5kUmYuPWzOgFnJ83g": '{"id": "evt_1JB4HyE5kUmYuPWzOgFnJ83g", "object": "event", "api_version": "2020-08-27", "created": 1625777861, "data": {"object": {"id": "pi_1JB4HaE5kUmYuPWz9O9m5vd9", "object": "payment_intent", "amount": 10000, "amount_capturable": 0, "amount_received": 10000, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": {"object": "list", "data": [{"id": "ch_1JB4HxE5kUmYuPWzz7oeBRTi", "object": "charge", "amount": 10000, "amount_captured": 10000, "amount_refunded":0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1JB4HxE5kUmYuPWzF7x0LIOJ", "billing_details": {"address": {"city": null, "country": "US", "line1":null, "line2": null, "postal_code": "42424", "state": null}, "email": "aapeli@couchers.org", "name": "4242", "phone": null}, "calculated_statement_descriptor": "COUCHERS.ORG", "captured": true, "created": 1625777861, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": null, "destination": null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": {},"invoice": null, "livemode": false, "metadata": {}, "on_behalf_of": null, "order": null, "outcome": {"network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 36, "seller_message": "Payment complete.", "type": "authorized"}, "paid": true, "payment_intent": "pi_1JB4HaE5kUmYuPWz9O9m5vd9", "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_details": {"card": {"brand": "visa", "checks": {"address_line1_check": null, "address_postal_code_check": "pass", "cvc_check": null}, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "21t4GP64aKT4zfvM", "funding": "credit", "installments": null, "last4": "4242", "network": "visa", "three_d_secure": null, "wallet": null}, "type": "card"}, "receipt_email": "aapeli@couchers.org", "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4HxE5kUmYuPWzz7oeBRTi/rcpt_JohhbAbYmnsICXvVleNLWd4bLy6HRn3", "refunded": false, "refunds": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_1JB4HxE5kUmYuPWzz7oeBRTi/refunds"}, "review": null, "shipping": null, "source": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}], "has_more": false, "total_count": 1, "url": "/v1/charges?payment_intent=pi_1JB4HaE5kUmYuPWz9O9m5vd9"}, "client_secret": "pi_1JB4HaE5kUmYuPWz9O9m5vd9_secret_HRoOPtRXhXx9SC5BO26Laz9Nu", "confirmation_method": "automatic", "created": 1625777838, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": null, "invoice": null, "last_payment_error": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_options": {"card": {"installments": null, "network": null, "request_three_d_secure": "automatic"}}, "payment_method_types": ["card"], "receipt_email": "aapeli@couchers.org", "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 1, "request": {"id": "req_1dpyMmLouKPCx9", "idempotency_key": null}, "type": "payment_intent.succeeded"}',
245 "evt_1JB4HyE5kUmYuPWzATTZL7Mt": '{"id": "evt_1JB4HyE5kUmYuPWzATTZL7Mt", "object": "event", "api_version": "2020-08-27", "created": 1625777861, "data": {"object": {"id": "ch_1JB4HxE5kUmYuPWzz7oeBRTi", "object": "charge", "amount": 10000, "amount_captured": 10000, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1JB4HxE5kUmYuPWzF7x0LIOJ", "billing_details": {"address": {"city": null, "country": "US", "line1": null, "line2": null, "postal_code": "42424", "state": null}, "email": "aapeli@couchers.org", "name": "4242", "phone": null}, "calculated_statement_descriptor": "COUCHERS.ORG", "captured": true, "created": 1625777861, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": null, "destination":null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": {}, "invoice": null, "livemode": false, "metadata": {}, "on_behalf_of": null, "order": null, "outcome": {"network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 36, "seller_message": "Payment complete.", "type": "authorized"}, "paid": true, "payment_intent": "pi_1JB4HaE5kUmYuPWz9O9m5vd9", "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_details": {"card": {"brand": "visa", "checks": {"address_line1_check": null, "address_postal_code_check": "pass", "cvc_check": null}, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "21t4GP64aKT4zfvM", "funding": "credit", "installments": null, "last4": "4242", "network": "visa", "three_d_secure": null, "wallet": null}, "type": "card"}, "receipt_email": "aapeli@couchers.org", "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4HxE5kUmYuPWzz7oeBRTi/rcpt_JohhbAbYmnsICXvVleNLWd4bLy6HRn3", "refunded": false, "refunds": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_1JB4HxE5kUmYuPWzz7oeBRTi/refunds"}, "review": null, "shipping": null, "source": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_1dpyMmLouKPCx9", "idempotency_key": null}, "type": "charge.succeeded"}',
246 "evt_1JB4HyE5kUmYuPWzINvGWlRu": '{"id": "evt_1JB4HyE5kUmYuPWzINvGWlRu", "object": "event", "api_version": "2020-08-27", "created": 1625777862, "data": {"object": {"id": "cs_test_a1ScieS4Qtnak4fI7qhUChYz0XBBzwRBKMjNESus7eiF0WvIcV07i3TFx5", "object": "checkout.session", "allow_promotion_codes": null, "amount_subtotal": 10000, "amount_total": 10000, "automatic_tax": {"enabled": false, "status": null}, "billing_address_collection": null, "cancel_url": "http://localhost:3000/donate?cancelled=true", "client_reference_id": "1", "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "customer_details": {"email": "aapeli@couchers.org", "tax_exempt": "none", "tax_ids": []}, "customer_email": null, "livemode": false, "locale": null, "metadata": {}, "mode": "payment", "payment_intent": "pi_1JB4HaE5kUmYuPWz9O9m5vd9", "payment_method_options": {}, "payment_method_types": ["card"], "payment_status": "paid", "setup_intent": null, "shipping": null, "shipping_address_collection": null, "submit_type": "donate", "subscription": null, "success_url": "http://localhost:3000/donate?success=true&session={CHECKOUT_SESSION_ID}", "total_details": {"amount_discount": 0, "amount_shipping": 0, "amount_tax": 0}, "url": null}}, "livemode": false, "pending_webhooks": 3, "request": {"id": null, "idempotency_key": null}, "type": "checkout.session.completed"}',
247 "evt_1JB4JzE5kUmYuPWzcUfHrmpg": '{"id": "evt_1JB4JzE5kUmYuPWzcUfHrmpg", "object": "event", "api_version": "2020-08-27", "created": 1625777986, "data": {"object": {"id": "ch_1JB4JyE5kUmYuPWzQE89dS26", "object": "charge", "amount": 2500, "amount_captured": 2500, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1JB4JyE5kUmYuPWz7wUQ30jb", "billing_details": {"address": {"city": null, "country": "US", "line1": null, "line2": null, "postal_code": "42424", "state": null}, "email": "aapeli@couchers.org", "name": "4242", "phone": null}, "calculated_statement_descriptor": "COUCHERS.ORG", "captured": true, "created": 1625777986, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": "Subscription creation", "destination": null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": {}, "invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "livemode": false, "metadata": {}, "on_behalf_of": null, "order": null, "outcome": {"network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 14, "seller_message": "Payment complete.", "type": "authorized"}, "paid": true, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_details": {"card": {"brand": "visa", "checks": {"address_line1_check": null, "address_postal_code_check": "pass", "cvc_check": null}, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "21t4GP64aKT4zfvM", "funding": "credit", "installments": null, "last4": "4242", "network": "visa", "three_d_secure": null, "wallet": null}, "type": "card"}, "receipt_email": "aapeli@couchers.org", "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4JyE5kUmYuPWzQE89dS26/rcpt_JohjDboc1K4PvOpYwBVD7iaxTggr8xt", "refunded": false, "refunds": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_1JB4JyE5kUmYuPWzQE89dS26/refunds"}, "review": null, "shipping": null, "source": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "charge.succeeded"}',
248 "evt_1JB4JzE5kUmYuPWzDA6Qyjpb": '{"id": "evt_1JB4JzE5kUmYuPWzDA6Qyjpb", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "cs_test_a1xQjLyaMWpDj2Quqc5JBFnVQXHcVuS5bu53Nr8Kz6xDTuXERmqNzz3dUi", "object": "checkout.session", "allow_promotion_codes": null, "amount_subtotal": 2500, "amount_total": 2500, "automatic_tax": {"enabled": false, "status": null}, "billing_address_collection": null, "cancel_url": "http://localhost:3000/donate?cancelled=true", "client_reference_id": "1", "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "customer_details": {"email": "aapeli@couchers.org", "tax_exempt": "none", "tax_ids": []}, "customer_email": null, "livemode": false, "locale": null, "metadata": {}, "mode": "subscription", "payment_intent": null, "payment_method_options": {}, "payment_method_types": ["card"], "payment_status": "paid", "setup_intent": null, "shipping": null, "shipping_address_collection": null, "submit_type": null, "subscription": "sub_Johj2mPZu6V3CG", "success_url": "http://localhost:3000/donate?success=true&session={CHECKOUT_SESSION_ID}", "total_details": {"amount_discount": 0, "amount_shipping": 0, "amount_tax": 0}, "url": null}}, "livemode": false, "pending_webhooks": 3, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "checkout.session.completed"}',
249 "evt_1JB4JzE5kUmYuPWzjn9vamRp": '{"id": "evt_1JB4JzE5kUmYuPWzjn9vamRp", "object": "event", "api_version": "2020-08-27", "created": 1625777985, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 0, "amount_remaining": 2500, "application_fee_amount": null, "attempt_count": 0, "attempted": false, "auto_advance": true, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": null, "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": null, "footer": null, "hosted_invoice_url": null, "invoice_pdf": null, "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": 1625781585, "number": null, "on_behalf_of": null, "paid": false, "payment_intent": null, "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "draft", "status_transitions": {"finalized_at": null, "marked_uncollectible_at": null, "paid_at": null, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.created"}',
250 "evt_1JB4JzE5kUmYuPWzRcyujatc": '{"id": "evt_1JB4JzE5kUmYuPWzRcyujatc", "object": "event", "api_version": "2020-08-27", "created": 1625777985, "data": {"object": {"id": "sub_Johj2mPZu6V3CG", "object": "subscription", "application_fee_percent": null, "automatic_tax": {"enabled": false}, "billing_cycle_anchor": 1625777985, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "collection_method": "charge_automatically", "created": 1625777985, "current_period_end": 1628456385, "current_period_start": 1625777985, "customer": "cus_JoeqxRiXxWnThy", "days_until_due": null, "default_payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "default_source": null, "default_tax_rates": [], "discount": null, "ended_at": null, "items": {"object": "list", "data":[{"id": "si_JohjxJdMfvbqIj", "object": "subscription_item", "billing_thresholds": null, "created": 1625777985, "metadata": {}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "tax_rates": []}], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_Johj2mPZu6V3CG"}, "latest_invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "livemode": false, "metadata": {}, "next_pending_invoice_item_invoice": null, "pause_collection": null, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "quantity": 25, "schedule": null, "start_date": 1625777985, "status": "incomplete", "transfer_data": null, "trial_end": null, "trial_start": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "customer.subscription.created"}',
251 "evt_1JB4K0E5kUmYuPWzqEdiFwUD": '{"id": "evt_1JB4K0E5kUmYuPWzqEdiFwUD", "object": "event", "api_version": "2020-08-27", "created": 1625777985, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 0, "amount_remaining": 2500, "application_fee_amount": null, "attempt_count": 0, "attempted": false, "auto_advance": true, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": null, "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": 0, "footer": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2/pdf", "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": 1625781585, "number": "6857C7A1-0004", "on_behalf_of": null, "paid": false, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "open", "status_transitions":{"finalized_at": 1625777985, "marked_uncollectible_at": null, "paid_at": null, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.finalized"}',
252 "evt_1JB4K0E5kUmYuPWzDbrDO7MI": '{"id": "evt_1JB4K0E5kUmYuPWzDbrDO7MI", "object": "event", "api_version": "2020-08-27", "created": 1625777985, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 0, "amount_remaining": 2500, "application_fee_amount": null, "attempt_count": 0, "attempted": false, "auto_advance": true, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": null, "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": 0, "footer": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2/pdf", "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": 1625781585, "number": "6857C7A1-0004", "on_behalf_of": null, "paid": false, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "open", "status_transitions":{"finalized_at": 1625777985, "marked_uncollectible_at": null, "paid_at": null, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}, "previous_attributes": {"ending_balance": null, "hosted_invoice_url": null, "invoice_pdf": null, "number": null, "payment_intent": null, "status": "draft", "status_transitions": {"finalized_at": null}}}, "livemode": false, "pending_webhooks": 1, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.updated"}',
253 "evt_1JB4K0E5kUmYuPWzHesDmivt": '{"id": "evt_1JB4K0E5kUmYuPWzHesDmivt", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 2500, "amount_remaining": 0, "application_fee_amount": null, "attempt_count": 1, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": "ch_1JB4JyE5kUmYuPWzQE89dS26", "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": 0, "footer": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2/pdf", "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false,"metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number":"6857C7A1-0004", "on_behalf_of": null, "paid": true, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1625777985, "marked_uncollectible_at": null, "paid_at": 1625777987, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}, "previous_attributes": {"amount_paid": 0, "amount_remaining": 2500, "attempt_count": 0, "attempted": false, "auto_advance": true, "charge": null, "next_payment_attempt": 1625781585, "paid": false, "status": "open", "status_transitions": {"paid_at": null}}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.updated"}',
254 "evt_1JB4K0E5kUmYuPWzszfh6fcC": '{"id": "evt_1JB4K0E5kUmYuPWzszfh6fcC", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "object": "payment_intent", "amount": 2500, "amount_capturable": 0, "amount_received": 2500, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": {"object": "list", "data": [{"id": "ch_1JB4JyE5kUmYuPWzQE89dS26", "object": "charge", "amount": 2500, "amount_captured": 2500, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1JB4JyE5kUmYuPWz7wUQ30jb", "billing_details": {"address": {"city": null, "country": "US", "line1": null, "line2": null, "postal_code": "42424", "state": null}, "email": "aapeli@couchers.org", "name": "4242", "phone": null}, "calculated_statement_descriptor": "COUCHERS.ORG", "captured": true, "created": 1625777986, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": "Subscription creation", "destination": null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": {}, "invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "livemode": false, "metadata": {}, "on_behalf_of": null, "order": null, "outcome": {"network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 14, "seller_message": "Payment complete.", "type": "authorized"}, "paid": true, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_details": {"card": {"brand": "visa", "checks": {"address_line1_check": null, "address_postal_code_check": "pass", "cvc_check": null}, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "21t4GP64aKT4zfvM", "funding": "credit", "installments": null, "last4": "4242", "network": "visa", "three_d_secure": null, "wallet": null}, "type": "card"}, "receipt_email": "aapeli@couchers.org", "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_1IQLEzE5kUmYuPWz/ch_1JB4JyE5kUmYuPWzQE89dS26/rcpt_JohjDboc1K4PvOpYwBVD7iaxTggr8xt", "refunded": false, "refunds": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_1JB4JyE5kUmYuPWzQE89dS26/refunds"}, "review": null, "shipping": null, "source": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}], "has_more": false, "total_count": 1, "url": "/v1/charges?payment_intent=pi_1JB4JxE5kUmYuPWzX0clpUMw"}, "client_secret": "pi_1JB4JxE5kUmYuPWzX0clpUMw_secret_kvpjSQKVkpCtWjhBCvoEk9fKn", "confirmation_method": "automatic", "created": 1625777985, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": "Subscription creation", "invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "last_payment_error": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "payment_method_options": {"card": {"installments": null, "network": null, "request_three_d_secure": "automatic"}}, "payment_method_types": ["card"], "receipt_email": "aapeli@couchers.org", "review": null, "setup_future_usage": "off_session", "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "payment_intent.succeeded"}',
255 "evt_1JB4K0E5kUmYuPWzTCyFgyhF": '{"id": "evt_1JB4K0E5kUmYuPWzTCyFgyhF", "object": "event", "api_version": "2020-08-27", "created": 1625777985, "data": {"object": {"id": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "object": "payment_intent", "amount": 2500, "amount_capturable": 0, "amount_received": 0, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": {"object": "list", "data": [], "has_more": false, "total_count": 0, "url": "/v1/charges?payment_intent=pi_1JB4JxE5kUmYuPWzX0clpUMw"}, "client_secret": "pi_1JB4JxE5kUmYuPWzX0clpUMw_secret_kvpjSQKVkpCtWjhBCvoEk9fKn", "confirmation_method": "automatic", "created": 1625777985, "currency": "usd", "customer": "cus_JoeqxRiXxWnThy", "description": "Subscription creation", "invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "last_payment_error": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": {"card": {"installments": null, "network": null, "request_three_d_secure": "automatic"}}, "payment_method_types": ["card"], "receipt_email": "aapeli@couchers.org", "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "payment_intent.created"}',
256 "evt_1JB4K0E5kUmYuPWzh6QF2Md4": '{"id": "evt_1JB4K0E5kUmYuPWzh6QF2Md4", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "sub_Johj2mPZu6V3CG", "object": "subscription", "application_fee_percent": null, "automatic_tax": {"enabled": false}, "billing_cycle_anchor": 1625777985, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "collection_method": "charge_automatically", "created": 1625777985, "current_period_end": 1628456385, "current_period_start": 1625777985, "customer": "cus_JoeqxRiXxWnThy", "days_until_due": null, "default_payment_method": "pm_1JB1YlE5kUmYuPWzfEqqdp2L", "default_source": null, "default_tax_rates": [], "discount": null, "ended_at": null, "items": {"object": "list", "data":[{"id": "si_JohjxJdMfvbqIj", "object": "subscription_item", "billing_thresholds": null, "created": 1625777985, "metadata": {}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "tax_rates": []}], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_Johj2mPZu6V3CG"}, "latest_invoice": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "livemode": false, "metadata": {}, "next_pending_invoice_item_invoice": null, "pause_collection": null, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "quantity": 25, "schedule": null, "start_date": 1625777985, "status": "active", "transfer_data": null, "trial_end": null, "trial_start": null}, "previous_attributes": {"status": "incomplete"}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "customer.subscription.updated"}',
257 "evt_1JB4K0E5kUmYuPWzSj00EC0m": '{"id": "evt_1JB4K0E5kUmYuPWzSj00EC0m", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 2500, "amount_remaining": 0, "application_fee_amount": null, "attempt_count": 1, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": "ch_1JB4JyE5kUmYuPWzQE89dS26", "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": 0, "footer": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2/pdf", "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false,"metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number":"6857C7A1-0004", "on_behalf_of": null, "paid": true, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1625777985, "marked_uncollectible_at": null, "paid_at": 1625777987, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}}, "livemode": false, "pending_webhooks": 3, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.paid"}',
258 "evt_1JB4K0E5kUmYuPWzGQN86BFq": '{"id": "evt_1JB4K0E5kUmYuPWzGQN86BFq", "object": "event", "api_version": "2020-08-27", "created": 1625777987, "data": {"object": {"id": "in_1JB4JxE5kUmYuPWzwN3bo9dF", "object": "invoice", "account_country": "AU", "account_name": "Couchers.org Foundation", "account_tax_ids": null, "amount_due": 2500, "amount_paid": 2500, "amount_remaining": 0, "application_fee_amount": null, "attempt_count": 1, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "subscription_create", "charge": "ch_1JB4JyE5kUmYuPWzQE89dS26", "collection_method": "charge_automatically", "created": 1625777985, "currency": "usd", "custom_fields": null, "customer": "cus_JoeqxRiXxWnThy", "customer_address": null, "customer_email": "aapeli@couchers.org", "customer_name": null, "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": null, "ending_balance": 0, "footer": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1IQLEzE5kUmYuPWz/invst_Johj3QcmbbpYP6DYGk0LX4S4lL9knr2/pdf", "last_finalization_error": null, "lines": {"object": "list", "data": [{"id": "il_1JB4JxE5kUmYuPWzXSaZXqdM", "object": "line_item", "amount": 2500, "currency": "usd", "description": "25 \u00d7 Couchers financial supporter (Tier 2 at $1.00 / month)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "period": {"end": 1628456385, "start": 1625777985}, "plan": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1IRoHdE5kUmYuPWz9tX8UpRv", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1614991577, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_J3w9CjrOA1tcGN", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null}, "proration": false, "quantity": 25, "subscription": "sub_Johj2mPZu6V3CG", "subscription_item": "si_JohjxJdMfvbqIj", "tax_amounts": [], "tax_rates": [], "type": "subscription"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1JB4JxE5kUmYuPWzwN3bo9dF/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number": "6857C7A1-0004", "on_behalf_of": null, "paid": true, "payment_intent": "pi_1JB4JxE5kUmYuPWzX0clpUMw", "payment_settings": {"payment_method_options": null, "payment_method_types": null}, "period_end": 1625777985, "period_start": 1625777985, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1625777985, "marked_uncollectible_at": null, "paid_at": 1625777987, "voided_at": null}, "subscription": "sub_Johj2mPZu6V3CG", "subtotal": 2500, "tax": null, "total": 2500, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": null}}, "livemode": false, "pending_webhooks": 2, "request": {"id": "req_Ae5wD66dsPtvbT", "idempotency_key": null}, "type": "invoice.payment_succeeded"}',
259}